Skip to content

Instantly share code, notes, and snippets.

View nakiostudio's full-sized avatar
⚛️

Carlos Vidal nakiostudio

⚛️
View GitHub Profile
@nakiostudio
nakiostudio / regexCheatsheet.js
Created January 15, 2019 09:52 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@nakiostudio
nakiostudio / gist:205a7c5920cc01530916e35efd929e67
Created June 27, 2018 22:20 — forked from pguillory/gist:729616
Hooking into Node.js stdout
var util = require('util')
function hook_stdout(callback) {
var old_write = process.stdout.write
process.stdout.write = (function(write) {
return function(string, encoding, fd) {
write.apply(process.stdout, arguments)
callback(string, encoding, fd)
}
@nakiostudio
nakiostudio / injectReveal.sh
Created August 13, 2017 10:41
Using lldb to inject Reveal into a process
lldb attach -p `ps x|grep XING|grep -v grep|awk '{print $1}'`
expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);
expr [(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
c