Skip to content

Instantly share code, notes, and snippets.

View yorch's full-sized avatar

Jorge Barnaby yorch

  • SentinelOne
  • Miami, FL
View GitHub Profile
@yorch
yorch / .slate.js
Created January 19, 2015 01:12
Slate Config file
var pushRight = slate.operation("push", {
"direction" : "right",
"style" : "bar-resize:screenSizeX/2"
});
var pushLeft = slate.operation("push", {
"direction" : "left",
"style" : "bar-resize:screenSizeX/2"
});
var pushTop = slate.operation("push", {
"direction" : "top",

Keybase proof

I hereby claim:

  • I am yorch on github.
  • I am yorch (https://keybase.io/yorch) on keybase.
  • I have a public key whose fingerprint is 5D5D A1D1 347A 1523 B268 694B 02AC 4F9E 4323 0DAC

To claim this, I am signing this object:

@yorch
yorch / gist:2891402
Created June 7, 2012 20:37
Variable Size Background (jQuery)
(function() {
// Background image variable size (keeping aspect ratio fixed)
// Based on http://jonathanstark.com/blog/2011/01/03/variable-size-background-image/
// By Jorge Barnaby (jorge {dot} barnaby {at} gmail) - Jun 2012
// Background image
var imgPath = 'assets/background.jpg'; // Path of the image to be used as background
var origW = 1920; // Original width of the image
var origH = 1080; // Original height of the image
var ratio = origW / origH;
@yorch
yorch / .gitignore
Created July 17, 2012 16:09
.gitignore for ASP.Net MVC
###################
# http://stackoverflow.com/questions/639647/git-and-asp-mvc
###################
#
###################
# compiled source #
###################
*.com
*.class
*.dll
@yorch
yorch / rename_to_exiftime.py
Last active October 7, 2015 10:57
Rename JPEG files according to EXIF-date using PIL
## {{{ http://code.activestate.com/recipes/578219/ (r2)
# -*- coding: Windows-1251 -*-
'''
rename_to_exiftime.py
Rename JPEG files according to EXIF-date using PIL
If global variable CREATE_HARDLINK is set, script creates Windows (XP) batch file
for creating hardlink version of source files
# Example of a DelayedJob that syncs info with mailchimp
class SyncMailchimp < Struct.new(:opts)
include Dobexer::ExceptionNotifier
def run_hominid(attempts = 0, &block)
attempts += 1
block.call
rescue EOFError => e
@yorch
yorch / network_monitor.sh
Last active October 16, 2016 17:30
Rasbperry Pi WLAN Network Monitor
#!/bin/bash
HOST=www.google.com
while true ; do
if ifconfig wlan0 | grep -q "inet addr:" ; then
#$printf "WLAN connected, IP: %s\n" $(hostname -I)
sleep 60
else
echo "Network connection down! Attempting reconnection."
@yorch
yorch / .zpreztorc
Created July 8, 2018 22:32
Servers' prezto config
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@yorch
yorch / setup-prezto.sh
Last active July 8, 2018 22:58
Install ZSH and Prezto, then download custom config
#!/bin/zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
curl -s https://gist.githubusercontent.com/yorch/e60087118c0126b2f5f8bf8a271633eb/raw/74d2593d6fd277c05f93fd62ee5a3eb3399f2139/.zpreztorc > "${ZDOTDIR:-$HOME}/.zprezto/runcoms/zpreztorc"
@yorch
yorch / run-wowza-docker.sh
Created June 26, 2020 02:14
Run Wowza Streaming Server in Docker bash script
#!/bin/bash
VERSION=4.8.0
IMAGE=wowzamedia/wowza-streaming-engine-linux:${VERSION}
NAME=wowza
DATA_DIR=$(pwd)/data
CONFIG_DIR=${DATA_DIR}/conf
LOGS_DIR=${DATA_DIR}/logs
SUPERVISOR_LOG_FILE=${DATA_DIR}/supervisord.log