Skip to content

Instantly share code, notes, and snippets.

@risent
risent / designer.html
Created June 27, 2014 06:40
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
[peername]
proto = nacltai
proto_publickey = LOCAL_PUBKEY
proto_privatekey = REMOTE_PRIKEY
local = tuntap
local_interface = tunnel
local_tunmode = 1
peer = udp
peer_localaddr = REMOTE_IP
peer_localport = 8000
import random
import time
import numpy
from exceptions import ValueError
class PushID(object):
# Modeled after base64 web-safe chars, but ordered by ASCII.
PUSH_CHARS = ('-0123456789'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@risent
risent / umspay.py
Created March 27, 2015 02:42
UMSPay python sdk
# -*- coding: utf-8 -*-
'''
Created on 2014-10-21
UMSPay API
@author: risent
'''
import base64
from binascii import unhexlify, hexlify
import json
from collections import OrderedDict
@risent
risent / auth.go
Last active August 29, 2015 14:21 — forked from ngrilly/auth.go
package auth
import (
"net/http"
"net/url"
"strings"
"time"
"lib/crypto"
"lib/utils"
@risent
risent / cmds.txt
Last active August 29, 2015 14:22 — forked from wong2/cmds.txt
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
@risent
risent / openresty
Last active August 29, 2015 14:24 — forked from pwm/openresty
#!/bin/bash
#
# chkconfig: 2345 55 25
# description: Openresty
# processname: nginx
# config: /usr/local/openresty/nginx/conf/nginx.conf
# pidfile: /usr/local/openresty/nginx/logs/nginx.pid
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs $network $named $syslog $time
@risent
risent / remove-remote-branch.bash
Created October 13, 2015 09:00
Remove remote branch tracking
git branch -a | awk -F "/" '{if (NF>1 && $3!="master") print $2"/"$3}' | xargs git branch -d -r