Skip to content

Instantly share code, notes, and snippets.

View TheNoim's full-sized avatar
🏠
Working from home

Nils Bergmann TheNoim

🏠
Working from home
View GitHub Profile
#!/bin/bash
set -e
ROOT=${PWD}
SCRIPT_DIR="$(dirname "$BASH_SOURCE")"
cd "$SCRIPT_DIR"
SCRIPT_DIR=${PWD}
@TheNoim
TheNoim / example.js
Created September 30, 2018 07:29
Fix realm infinity recursion and array stringify issue
const Dog = {
name: 'Dog',
properties: {
name: 'string',
owners: {type: 'linkingObjects', objectType: 'Person', property: 'dog'},
}
};
const Person = {
name: 'Person',
@TheNoim
TheNoim / keybase.md
Created December 31, 2018 15:04
Keybase

Keybase proof

I hereby claim:

  • I am thenoim on github.
  • I am noim (https://keybase.io/noim) on keybase.
  • I have a public key ASADFRmb01JaHoYi133EfTe70Il5Mqxdblh0cxac0ZuWvgo

To claim this, I am signing this object:

@TheNoim
TheNoim / diagnostics.plist
Created February 23, 2019 17:11
iPad 7,4 - unc0ver 3.0.0b32
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppVersion</key>
<string>3.0.0~b32</string>
<key>LogFile</key>
<string>2019-02-23 09:29:06.781 Undecimus[9292:10459014] [*] unc0ver Version: 3.0.0~b30
2019-02-23 09:29:06.781 Undecimus[9292:10459014] [*] Darwin Kernel Version 18.2.0: Tue Oct 16 21:02:31 PDT 2018; root:xnu-4903.222.5~1/RELEASE_ARM64_T8011
2019-02-23 09:29:06.781 Undecimus[9292:10459014] [*] Bundled Resources Version: 1.0~b4
#!/bin/bash
set -e
ROOT=${PWD}
SCRIPT_DIR="$(dirname "$BASH_SOURCE")"
cd "$SCRIPT_DIR"
SCRIPT_DIR=${PWD}
@TheNoim
TheNoim / trig.scss
Last active March 13, 2019 20:21 — forked from kamikat/trig.scss
SCSS/SASS module calculating sin/cos/tan using Taylor Expansion.
///////////////////////////////////////////////////////////////////////////////////
// Plain SASS Trigonometry Algorithm in Taylor Expansion //
// //
// Based on //
// http://japborst.net/posts/sass-sines-and-cosines //
// + http://thesassway.com/advanced/inverse-trigonometric-functions-with-sass //
///////////////////////////////////////////////////////////////////////////////////
$pi: 3.14159265359;
$_precision: 10;
@TheNoim
TheNoim / DSBDecode.js
Created February 14, 2017 20:56
mobile.dsbcontrol.de decode encode
/**
* Created by nilsbergmann on 14.02.17.
*/
const pako = require('pako');
function atob(a) {
for (var b, c, d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", e = String(a).replace(/=+$/, ""), f = 0, g = 0, h = ""; c = e.charAt(g++); ~c && (b = f % 4 ? 64 * b + c : c,
f++ % 4) ? h += String.fromCharCode(255 & b >> (-2 * f & 6)) : 0)
c = d.indexOf(c);
return h
}
import Foundation
import Combine
enum LoadDirection {
case BACK
case FORTH
}
protocol SwipeableList: ObservableObject, RandomAccessCollection where Index == Int, Element: IdentifiableElement {
func updateCurrentIndex(to index: Index);
// Name: jira
import "@johnlindquist/kit"
let id = await arg('Which id?')
if (!/SP-\d+/gmi.test(id)) {
id = `SP-${id}`;
}
@TheNoim
TheNoim / script.csgo.ts
Created December 20, 2023 21:00
Change desk lamp color if you pickup a weapon with less than 30% ammo in CS2
import type { GameState, Weapons, Weapon, WeaponSlotType } from "npm:csgo-gsi-types";
import Fastify from "npm:fastify";
import {
useAsyncState,
useNewLight,
colors
} from "reactive-home";
declare module 'csgo-gsi-types' {
export interface Player {