Skip to content

Instantly share code, notes, and snippets.

View cskeppstedt's full-sized avatar

Christoffer cskeppstedt

View GitHub Profile
@cskeppstedt
cskeppstedt / README.md
Created March 13, 2022 22:05
Modify proguard rules in a managed expo project

Modify proguard rules in a managed expo project

If you ever need to modify the proguard rules for the Android-part of your Expo managed workflow, you can achieve this by using a config plugin.

  1. Make a folder for config-plugins called ./plugins in the project root folder.
  2. Place the withProguardRules.js and my-proguard-rules.pro in the folder
  3. Add the config plugin to the plugins array of your app.config.js (or app.json if you're using that instead).

NOTE: if you rename your .pro file, don't forget to change the two occurrences of my-proguard-rules in withProguardRules.js as well.

@cskeppstedt
cskeppstedt / christoffer's .vimrc
Created December 13, 2016 08:41
My personal .vimrc in its current state
syntax on
set number
set numberwidth=5
set autoindent
set nowrap
set backspace=indent,eol,start whichwrap+=<,>,[,]
set laststatus=2
" LEADER key mapping
@cskeppstedt
cskeppstedt / .tmux.conf
Created March 13, 2016 18:06
My current vim setup
######################################################
# Theme and general behavior
######################################################
set-option -ga update-environment ' PTTY'
set -g default-terminal "screen-256color"
# set -g status-bg black
# set -g status-fg white
set -g status-bg colour15
set -g status-fg colour235
@cskeppstedt
cskeppstedt / example.ts
Last active September 9, 2015 19:57
example.ts
// --------------------------------
// The "class" way
// --------------------------------
class MyClass {
public someString: string;
public someNumber: number;
}
var instance = new MyClass();
instance.someString = "test";
@cskeppstedt
cskeppstedt / example.jsverify.spec.coffee
Last active August 29, 2015 14:22
Example of using property based testing with jsverify
# Assume this is a spec file to run in Mocha. This is an artificial example
# that tries to show the general idea of incorporating property based testing.
jsc = require 'jsverify'
mySorter = require '../src/mySorter'
describe 'My sorting algorithm', ->
######################################################
@cskeppstedt
cskeppstedt / keybase.md
Created January 13, 2015 08:50
keybase.md

Keybase proof

I hereby claim:

  • I am cskeppstedt on github.
  • I am skeppstedt (https://keybase.io/skeppstedt) on keybase.
  • I have a public key whose fingerprint is CD3D BDF8 7858 F22D 0674 EBD8 0CB0 4730 5CB1 0A03

To claim this, I am signing this object:

bool TryGetTasksFromCache(int userId = -1, string stage, out List<UserTask> cachedTasks)
{
cachedTasks = DataCache[GetCacheKey(userId, stage)] as List<UserTask>;
return (cachedTasks != null);
}
List<UserTask> GetTasks(int userId = -1, string stage, List<Severity> severities = null)
{
List<UserTask> listOfUserTasks;
if (TryGetTasksFromCache(userId, stage, out listOfUserTasks))