Skip to content

Instantly share code, notes, and snippets.

View KristofferBerg's full-sized avatar
🎯
Focusing

Kristoffer H. Berg KristofferBerg

🎯
Focusing
View GitHub Profile
@KristofferBerg
KristofferBerg / MainActivity.kt
Created April 10, 2025 20:46
MainActivity.kt
package com.example.myapplication
import android.app.PendingIntent
import android.content.Intent
import android.content.IntentFilter
import android.nfc.NfcAdapter
import android.nfc.Tag
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
@KristofferBerg
KristofferBerg / startup.sh
Created February 25, 2025 13:08
Ubuntu 20.04 -> Install chrome and CloudCast extension and start it
#!/bin/bash
# Exit on any error
set -e
echo "Starting Chrome installation and extension setup..."
# Check if Chrome is already installed
if ! command -v google-chrome &> /dev/null; then
echo "Chrome not found. Installing Chrome..."
@KristofferBerg
KristofferBerg / pagination.vue
Created September 7, 2022 19:50
Showing Pagination in VueJS :)
<template>
<table>
<tr
v-for="(item,index) in pageItems"
:key="'name_'+item.name+'_'+index">
<td>{{item}}</td>
</tr>
</table>
@KristofferBerg
KristofferBerg / 1.js
Created January 3, 2020 13:15
Mock of Animation object
const object = {
anim: {
effects: [
pulse: {
start: {
scaleX: object.scaleX * 1.25,
scaleY: object.scaleY * 1.25,
},
end: {
@KristofferBerg
KristofferBerg / index.html
Last active November 10, 2019 23:13
This demonstrates the BrandApp.io integration which allows any online application to open BrandApp from a modal / window. From here you can use BrandApp as normal, but in addition you have a "Insert Now" button which pushes your design into the parent application. https://brandapp.io
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Your Application</title>
</head>
<body>
<h1>Your Application</h1>
<h3>Media List</h3>