Skip to content

Instantly share code, notes, and snippets.

Avatar

Ralf Crisostomo ralphcrisostomo

  • Goodstuff
  • Australia
View GitHub Profile
View singapore_postals.json
{
"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 Feb 19, 2017
Embed Meta Tags to a 360 image
View embed-meta-tags-360-image.md

#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 Nov 15, 2016
AE Expression for controlling a rotation
View ae-rotation-controll
//
// 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 Sep 10, 2016
Copy and rename videos from a directory
View copy_rename_videos.sh
# #!/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 Jul 3, 2016
Google Material Design Shadow SASS
View google-material-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
View network_ap.sh
#!/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
Script to organize pictures and videos
View move_picture.sh
#!/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")
View aws-api-gateway-form-to-json.ftl
## 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 Jun 18, 2016
Script to series on a new created directory
View move.sh
#!/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 Oct 20, 2021
Batch convert videos with HandBrake CLI
View handbrake.sh
#!/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