Skip to content

Instantly share code, notes, and snippets.

View seangeleno's full-sized avatar

Sean Marcel Esteva seangeleno

View GitHub Profile

assume we start with a file named foo.txt that has no assigned permissions, like this:

----------

add read permission to the file for all users:

chmod +r foo.txt
-r--r--r--

Next add write permission to the file for all users:

@seangeleno
seangeleno / crontab.sh
Created August 21, 2017 02:43
crontab file example
#--------------------------------------------------
# example unix/linux crontab file format:
#--------------------------------------------------
# min,hour,dayOfMonth,month,dayOfWeek command
#
# field allowed values
# ----- --------------
# minute 0-59
# hour 0-23
# day of month 1-31
@seangeleno
seangeleno / coding-math-episode-21-bitmap-collision-detection.markdown
Created September 11, 2017 20:58
Coding Math: Episode 21 - Bitmap Collision Detection
@seangeleno
seangeleno / array_object_foreach.js
Created September 14, 2017 08:25
Arrays and Objects it ForEach()
var tickers = ['BTC-USD', 'ETH-USD', 'LTC-USD', 'XMR-USD', 'IOTA-USD'];
var bag = {};
tickers.forEach(function(pairs){
bag[pairs] = {};
});
@seangeleno
seangeleno / gpg.sh
Last active March 17, 2018 20:05 — forked from TheFox/gpg.md
Creating the perfect GPG keypair
#!/usr/bin/env bash
# Original: https://alexcabal.com/creating-the-perfect-gpg-keypair/
KEY=xyz
DATE=$(date +"%Y%m%d")
SCRIPT_BASEDIR=$(dirname $0)
cd $SCRIPT_BASEDIR
echo "This script is not for use in automation"
@seangeleno
seangeleno / composure.sh
Created November 17, 2017 04:38
Light <3'd Shell Functions for Intuitive Programming
#!/bin/bash
# composure - by seane
# light-<3'd shell functions for intuitive programming
# version: 1.3.1
# latest source available at http://git.io/composure
# install: source this script in your ~/.profile or ~/.${SHELL}rc script
# known to work on bash, zsh, and ksh93
@seangeleno
seangeleno / hmac.js
Created November 22, 2017 10:24
HMAC Digest
// Generic hmac digest creation to prove authenticity
var crypto = require('crypto');
function createSignature(timestamp, apiKey, apiSecret){
var hmac = crypto.createHmac('sha256', apiSecret );
hmac.update( timestamp + apiKey );
return hmac.digest('hex');
}
function createAuthRequest(apiKey, apiSecret ){
var timestamp = Math.floor(Date.now() / 1000); // Note: java and javascript timestamp presented in miliseconds
@seangeleno
seangeleno / dn.sh
Last active December 6, 2017 17:09
UNCENSORED DNS
#!/bin/bash
sleep 2
echo "\n\nThese are fantastic DNS Servers hailing all the way from Denmark! Yipee\n\n"
sleep 2
dnsv4=91.239.100.100
dnsv6=2001:67c:28a4::
dnsv4_2=89.233.43.71
dnsv6_2=2a01:3a0:53:53::
function givemednsorgivemedeath () {
@seangeleno
seangeleno / dns.txt
Created December 6, 2017 17:15
Uncensored DNS
91.239.100.100
2001:67c:28a4::
89.233.43.71
2a01:3a0:53:53::
@seangeleno
seangeleno / monero_setup.sh
Last active January 23, 2018 21:25
moonero
#!/bin/bash
MONERO_FOLDER=$HOME/.bitmonero
MONERO_BOOTSTRAP=$MONERO_FOLDER/upload
mkdir -p $MONERO_BOOTSTRAP && cd $MONERO_BOOTSTRAP
# First download the blockchain bootstrap
wget https://downloads.getmonero.org/blockchain.raw
cd ..