Skip to content

Instantly share code, notes, and snippets.

@triwav
triwav / roku-proxy-setup.md
Created April 30, 2019 14:33
Roku Proxy Setup

This is largely based off of this article by Hulu and their roku-dev-cli tool.

Requirements:
The main requirement is a Mac with 2 available network interfaces WIFI <-> WIFI, LAN <-> WIFI, etc. This should work on other platforms as well but isn't covered here.

Setup
The first thing we need is Homebrew. If you've never used it before it's a great package manager for macOS that makes installing programs easier. Open Terminal and paste
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and hit enter

@laat
laat / tizen.sh
Last active March 9, 2024 11:06
Notes on Tizen commands that might work
sdb connect <ip>:<port> # connect to TV
sdb -s <deviceName> capability # get <installationPath>
# build
tizen cli-config "default.profiles.path=<profile_path>"
tizen build-web -out .buildResult -- <source-dir>
tizen package --type wgt --sign profileName -- <source-dir>/.buildResult # extract <package-file>
mv <package-file> .
rm -rf <source-dir>/.buildResult
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@paulirish
paulirish / what-forces-layout.md
Last active May 9, 2024 07:00
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active May 6, 2024 04:53
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@scottslowe
scottslowe / defined-virt-user-ssh-key
Created October 20, 2013 03:38
This Puppet code uses define-based virtual user resources to help manage user account on systems. This includes user's SSH keys as well as other properties.
define accounts::virtual ($uid,$realname,$pass,$sshkeytype,$sshkey) {
include accounts::params
# Pull in values from accounts::params
$homepath = $accounts::params::homepath
$shell = $accounts::params::shell
# Create the user
user { $title:
ensure => 'present',
@jamesstout
jamesstout / process.py
Last active July 12, 2021 07:24
add tz param to https://github.com/mwaterfall/alfred-datetime-format-converter to get the time in your location. Some testing done.
# -*- coding: utf-8 -*-
import alfred
import calendar
import time
import math
from delorean import utcnow, parse, epoch
# global var to see if user
# has a time offset
@g3d
g3d / gist:2709563
Last active February 7, 2024 15:21 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
@nuxlli
nuxlli / localstorage.js
Created November 2, 2011 15:28
Fallback to localStorage in Samsung Smart TV
/**
* Fallback to localStorage
**/
;(function() {
if (typeof localStorage == "undefined" && typeof FileSystem == "function") {
var fileSyObj = new FileSystem();
var fileName = curWidget.id + "_localStorage.db";
var lStorage = {};
var changed = false;