Skip to content

Instantly share code, notes, and snippets.

View gigafied's full-sized avatar

Taka Kojima gigafied

View GitHub Profile
@gigafied
gigafied / test.txt
Created September 8, 2025 19:19
public gist
test
@gigafied
gigafied / gh_key.sh
Created September 4, 2018 00:11
GH RSA Script
#!/bin/bash
RSA_FILE_PATH="~/.ssh/github_rsa"
RSA_FILE="${RSA_FILE_PATH/#\~/$HOME}"
CONFIG_FILE=~/.ssh/config
read -p 'Github RSA Key Email: ' emailvar
read -sp 'Github RSA Key Password: ' passvar
mkdir -p ~/.ssh
process.on('uncaughtException', err => console.error('uncaughtException', err))
process.on('uncaughtRejection', err => process.emit('uncaughtException', err))
const example = () => {
return new Promise((resolve, reject) => {
setTimeout(() => reject(new Error('Uh oh')), 1000)
})
}
example()
@gigafied
gigafied / rtmp.js
Created October 29, 2015 00:45
UniFi Video - RTMP Streaming
(function () {
'use strict';
function initPlayer (url) {
jwplayer('playerID').setup({
file : url,
image: '//www.longtailvideo.com/content/images/jw-player/lWMJeVvV-876.jpg',
width: '50%',
primary: 'flash',
a {
transition-delay : n*100ms;
}
function hasNestedProperty(o, p) {
var i,
j;
for (i in o) {
j = o[i];
if (i === "p") {
return true;
}
(function () {
Ember.View.reopen({
isPrepped : false,
isAnimating : false,
cancelAnimation : false,
currentAnimationClass : "",
location /muppets-most-wanted/mobile.html {
alias /path/to/files/mobile.html;
}
location /muppets-most-wanted/ {
alias /path/to/files/;
set $mobile_rewrite do_not_perform;
set $force_dt_cookie "";
@gigafied
gigafied / gist:4718601
Created February 5, 2013 23:13
routing refactor
define (
[
"rosy/base/Class",
"rosy/routing/Router",
"rosy/routing/HistoryRouter",
"rosy/routing/HashRouter",
"mySite/views/About"
],
define (
[
"rosy/base/Class",
"rosy/routing/Router",
"rosy/routing/HistoryRouter",
"rosy/routing/HashRouter",
"mySite/views/About"
],