Skip to content

Instantly share code, notes, and snippets.

View dewback's full-sized avatar
🤡
Ocus focus

Fabián Arias dewback

🤡
Ocus focus
View GitHub Profile
@dewback
dewback / os-x-update-tzdata.sh
Created September 29, 2017 21:01 — forked from tgirardi/os-x-update-tzdata.sh
Update tzdata and ICU data on OS X to fix problems with outdated DST information (needs reboot)
#!/bin/bash
# author: Tomás Girardi
# Based on http://helw.net/2011/04/28/updating-osx-for-egypts-dst-changes/ by Ahmed El-Helw
# CHANGE THIS:
# go to https://www.iana.org/time-zones and get the URL for the last DATA
# release
URLTZDATASRC=https://www.iana.org/time-zones/repository/releases/tzdata2016d.tar.gz
# BACKUP your current icu file first
@dewback
dewback / ssh-chroot-jail.sh
Created August 18, 2017 14:16 — forked from floudet/ssh-chroot-jail.sh
Chroot Jail for SSH Access
# Chroot Jail for SSH Access
# Tested on Ubuntu 14.04.2 LTS and Debian GNU/Linux 8 (jessie)
# Reference : http://allanfeid.com/content/creating-chroot-jail-ssh-access
#
# Had to add/change several things to make it work, including:
# - create lib64 folder
# - copy whoami dependencies that ldd doesn't show to fix 'I have no name!'
# in the customized prompt + create passwd file
#
@dewback
dewback / keybase.md
Created June 16, 2017 01:24
keybase.md

Keybase proof

I hereby claim:

  • I am dewback on github.
  • I am fabianarias (https://keybase.io/fabianarias) on keybase.
  • I have a public key ASANqZPubVNRHmNrlwOUfFBI2wLBNVH_f5zQlbHnDFxddAo

To claim this, I am signing this object:

@dewback
dewback / System Design.md
Created May 4, 2016 15:45 — 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?
@dewback
dewback / cf-ddns.sh
Created December 25, 2015 15:17 — forked from larrybolt/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@dewback
dewback / cloudflare-update-record.sh
Created December 25, 2015 15:17 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'