Skip to content

Instantly share code, notes, and snippets.

View spino327's full-sized avatar

Sergio Pino spino327

View GitHub Profile
@spino327
spino327 / basic.sh
Last active April 27, 2018 18:54
Sample configuration files to use with the sourcing_tool (https://github.com/spino327/sourcing_tool)
#############################################################
# BASIC env #
#############################################################
echo "Hello Master! this is $SOURCING_TOOL_NAME."
#############
# BASIC STUFF
#############
export PATH=$HOME/bin:$PATH # to run programs that I set at ~/bin
@spino327
spino327 / ginger.vim
Created April 23, 2018 17:23
ginger.vim: vim script to use http://www.gingersoftware.com/proofreading-rephrase-for-app to perform grammar checks on text.
" based on https://github.com/mattn/ginger-vim
let s:endpoint = 'http://services.gingersoftware.com/Ginger/correct/json/GingerTheText'
let g:ginger_api_key = '6ae0c3a0-afdc-4532-a810-82ded0054236'
function! s:ginger(text)
if get(g:, 'ginger_api_key', '') == ''
throw 'g:ginger_api_key is not set'
endif
let res = webapi#json#decode(webapi#http#get(s:endpoint, {
\ 'lang': 'US',
@spino327
spino327 / user-data.yml
Created May 4, 2018 03:13
cloud-config for configuring a raspberry pi 3 model B with Hypriot OS
#cloud-config
# vim: syntax=yaml
#
# The current version of cloud-init in the Hypriot rpi-64 is 0.7.9
# When dealing with cloud-init, it is SUPER important to know the version
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
@spino327
spino327 / masquerade_as_mac.sh
Created July 28, 2018 20:04 — forked from u8sand/masquerade_as_mac.sh
El-Capitan Mac OS X VM Oracle Virtualbox configuration
#!/bin/bash
vm="OSX"
VBoxManage modifyvm $vm --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata $vm "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata $vm "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata $vm "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-F2238BAE"
VBoxManage setextradata $vm "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata $vm "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
@spino327
spino327 / Makefile.1
Last active January 17, 2019 22:07
Sample Makefiles
web:
jekyll clean -s frontend -d src/main/resources/assets
jekyll build -s frontend -d src/main/resources/assets
web_ci:
jekyll build -s frontend -d target/classes/assets -w&
package: web
mvn package
@spino327
spino327 / settings.json
Created December 8, 2019 06:08
VS Code latex-workshop conf
{
"latex-workshop.latex.tools": [
{
"name": "use_make",
"command": "make",
"args": [
"pdf"
]
}
],
@spino327
spino327 / System Design.md
Created May 25, 2020 23:49 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?