Skip to content

Instantly share code, notes, and snippets.

Christian Karl Bernasko chrisber

  • Stuttgart
Block or report user

Report or block chrisber

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-1 "['KP_7']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-2 "['KP_8']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-3 "['KP_9']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-4 "['KP_4']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-5 "['KP_5']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-6 "['KP_6']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-7 "['KP_1']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-8 "['KP_2']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-9 "['KP_3']"
chrisber /
Created Apr 9, 2018 — forked from phrawzty/
simple http server to dump request headers
$ curl -s -H "X-Something: yeah" localhost:8000 > /dev/null
$ python
ERROR:root:User-Agent: curl/7.37.1
Host: localhost:8000
Accept: */*
X-Something: yeah
View gist:edee8accccdcbb1d3340
This file has been truncated, but you can view the full file.
➜ io.js git:(79dd8f6) ✗ export CC=/Applications/
➜ io.js git:(79dd8f6) ✗ export CXX=/Applications/
➜ io.js git:(79dd8f6) ✗ ./configure --dest-cpu=ia32
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': ['OPENSSL_NO_SSL2=1'],
'include_dirs': [],
'libraries': []},
chrisber / gcc-4.9_g++-4.9_osx_10.10
Last active Aug 29, 2015
View gcc-4.9_g++-4.9_osx_10.10
➜ io.js git:(79dd8f6) ✗ export CC="/usr/local/bin/gcc-4.9 -fPIC"
➜ io.js git:(79dd8f6) ✗ export CXX="/usr/local/bin/g++-4.9 -fPIC"
➜ io.js git:(79dd8f6) ✗ export LINK="/usr/local/bin/g++-4.9 -fPIC"
➜ io.js git:(79dd8f6) ✗ ./configure --dest-cpu=ia32
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': ['OPENSSL_NO_SSL2=1'],
'include_dirs': [],
'libraries': []},
View gist:5615eb9e85696422e31a
sudo lldb
(lldb) target create mono
Current executable set to 'mono' (i386).
(lldb) run --debug V8.Net-Console.exe
Process 12784 launched: '/usr/bin/mono' (i386)
warning: (i386) /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
(lldb) c
Creating a V8Engine instance ... Done!



  • How to create a object
  • add it at function argument
  • add it to the global space
  • How to create a function like setTimeout
  • How to create a log function
  • How to access a the function of an object
  • How to pass a parameter to a function of an object.
View TypeScript_Compiler_API.js
// Blog post from Nicholas Wolverson
function getCompilerOutput(text) {
host.addFile(dummyScriptName, text);
var output = languageService.getEmitOutput(dummyScriptName).outputFiles;
return output && output.length > 0 ? output[0].text : "";
function getMatchingBracePosition(text, pos) {
host.addFile(dummyScriptName, text);
View gist:789d59372e9b41e657d9
public static void CleanupSemanticCache()
var ls = v8Engine.GlobalObject.GetProperty("languageService");
var resultHandle = ls.Call("cleanupSemanticCache", null);
public static Diagnostic[] GetSyntacticDiagnostics(string fileName)
Handle fileNameHandle = v8Engine.CreateValue(fileName);
var ls = v8Engine.GlobalObject.GetProperty("languageService");
View gist:e8c4394f7d887426bebd
module statechart
// local state
s : [0..4] init 0;
[] s=0 -> 1.0 : (s'=1) ;
[] s=1 -> 0.2 : (s'=3) + 0.8 : (s'=2);
[] s=2 -> 1.0 : (s'=1);
chrisber / v8dotnet_global_function.cs
Last active Aug 29, 2015
#v8dotnet Adding a fuction to global context setTimeout()
View v8dotnet_global_function.cs
public class setTimeout : V8Function
public override ObjectHandle Initialize(bool isConstructCall, params InternalHandle[] args)
Callback = setTimeoutConstructWrapper;
return base.Initialize(isConstructCall, args);
You can’t perform that action at this time.