Skip to content

Instantly share code, notes, and snippets.

View ralphcrisostomo's full-sized avatar

Ralf Crisostomo ralphcrisostomo

  • Goodstuff
  • Australia
View GitHub Profile
{
"postals" : [
{
"id" : "01",
"district" : "01",
"sectors" : ["01","02","03","04","05"],
"locations" : ["Raffles Place", "Cecil", "Marina", "People’s Park"]
},
{
"id" : "02",
@ralphcrisostomo
ralphcrisostomo / embed-meta-tags-360-image.md
Last active February 19, 2017 00:54
Embed Meta Tags to a 360 image

#Embed Meta Tags to a 360 image

exiftool -FullPanoWidthPixels=6000 -FullPanoHeightPixels=3000 -CroppedAreaLeftPixels=0 -CroppedAreaTopPixels=958 -CroppedAreaImageWidthPixels=6000 -CroppedAreaImageHeightPixels=1083 -ProjectionType=cylindrical image.jpg
exiftool -Make="RICOH" -Model="RICOH THETA S" image.jpg
@ralphcrisostomo
ralphcrisostomo / ae-rotation-controll
Created November 15, 2016 16:11
AE Expression for controlling a rotation
//
// Rotate Controller - By Ralph Crisostomo (16NOV2016)
// AE Expression
//
Radius = effect("Radius")("Slider");
Speed = effect("Speed")("Slider");
Multiplier = effect("Multiplier")("Slider");
X = effect("X")("Slider");
Y = effect("Y")("Slider");
@ralphcrisostomo
ralphcrisostomo / copy_rename_videos.sh
Created September 10, 2016 07:08
Copy and rename videos from a directory
# #!/bin/bash
#
# Copy and Rename Videos
# Created by : Ralph Crisostomo - 2016/09/10
#
# ./copy_rename_videos.sh /source/dir /destination/dir
#
SOURCE_DIR="$1"
VIDEO_DIR="$2"
@ralphcrisostomo
ralphcrisostomo / google-material-shadow.sass
Created July 3, 2016 15:42
Google Material Design Shadow SASS
//
// Google Material Design Shadow
// Ref: http://stackoverflow.com/questions/30533055/calculating-shadow-values-for-all-material-design-elevations
//
=shadow($dp)
@if $dp == 0
box-shadow : none
@else
$ambientY : $dp
#!/bin/bash
# Ref: http://www.contextis.com/resources/blog/wireless-phishing-captive-portals/
#
# Steps :
# ./network_ap.sh
# ./create_ap wlan0 eth0 AccessPoint -g 10.0.0.1
killall hostapd
killall dnsmasq
@ralphcrisostomo
ralphcrisostomo / move_picture.sh
Last active May 10, 2016 14:32
Script to organize pictures and videos
#!/bin/bash
# Script to organize pictures and videos
# By Ralph Crisostomo - 2016.05.10
#
# Usage :
# sudo ./move_picture.sh "GM1 - Day 01"
#
_destination="$1"
_date=$(date +"%Y%m%d")
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path('$'))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
@ralphcrisostomo
ralphcrisostomo / move.sh
Last active June 18, 2016 07:00
Script to series on a new created directory
#!/bin/bash
# Script to series on a new created directory
# By Ralph Crisostomo - 2016.04.17
#
# Usage :
# sudo ./move.sh SU supergirl Series01
#
PATTERN=$1
NAME=$2
@ralphcrisostomo
ralphcrisostomo / handbrake.sh
Last active July 18, 2023 15:13
Batch convert videos with HandBrake CLI
#!/bin/bash
# Batch convert videos with HandBrake CLI
# By Ralph Crisostomo - 2016.04.17
#
# Usage :
# 'sudo ./handbrake.sh /source /destination'
#
# Reference :
# https://forum.handbrake.fr/viewtopic.php?f=6&t=19426
# https://gist.github.com/czj/1263872