Skip to content

Instantly share code, notes, and snippets.

View thypon's full-sized avatar

Andrea Brancaleoni thypon

View GitHub Profile
@LucaCappelletti94
LucaCappelletti94 / MacOs quick setup.md
Last active October 27, 2023 03:17
MacOs commands to get you started.

MacOs quick setup 🚀

Getting everything ready

1 - Xcode/Ruby/Command line tools

You need to have Xcode installed to proceed.

xcode-select --install
sudo xcodebuild -license accept

2 - Brew

@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@nstarke
nstarke / nodejs-security-vulnerability-grep.sh
Last active January 25, 2023 05:44
Node.js Security Vulnerability Grep
# this command will return instances where the child_process module is loaded.
# that module is generally a good signal that the application is shelling out
egrep -r --exclude-dir "node_modules" --include "*.js" --exclude "*.min.*" -e "require(\s*)\((\s*)'child_process'(\s*))" .
# this command will return instances where code is dynamically executed.
egrep -r --exclude-dir "node_modules" --include "*.js" --exclude "*.min.*" -e "eval(\s*)\(" .
# this command will check common dangerous functions and report when strings are arguments
egrep -r --exclude-dir "node_modules" --include "*.js" --exclude "*.min.*" -e "(setInterval|setTimeout|new(\s*)Function)(\s*)\((\s*)\".*\"" .
@joekickass
joekickass / build_module.sh
Created October 1, 2012 08:43
Building Android
cd $ANDROID_BUILD_TOP/packages/apps/Music
mm
@ameerkat
ameerkat / BoyerMooreStringSearch.py
Created October 14, 2010 17:46
Boyer Moore string search implementation in Python
# Boyer Moore String Search implementation in Python
# Ameer Ayoub <ameer.ayoub@gmail.com>
# Generate the Bad Character Skip List
def generateBadCharShift(term):
skipList = {}
for i in range(0, len(term)-1):
skipList[term[i]] = len(term)-i-1
return skipList