Skip to content

Instantly share code, notes, and snippets.

@eriseven
eriseven / vpn.sh
Last active August 29, 2015 14:22 — forked from hongjiang/vpn.sh
#!/bin/bash
PROG_NAME=$0
ACTION=$1
usage() {
echo "Usage: $PROG_NAME {list|ping|optimal|conn|close|status}"
exit 1
}
@eriseven
eriseven / main.mm
Last active August 29, 2015 14:22 — forked from Daij-Djan/main.mm
//
// main.m
//
// Created by Dominik Pich on 10.02.13.
// Everybody is free to use this however they want!
//
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
tell application "System Events"
-- get current clipboard contents as a string
set CurrentClipboard to the clipboard as string
-- set the clipboad to your password
set the clipboard to "Y0urVPNPa$$w0rd"
-- start playing with the VPN
tell current location of network preferences
@eriseven
eriseven / zbs_user.lua
Created December 29, 2016 13:22
My ZeroBrane Studio Config
--[[--
Use this file to specify **User** preferences.
Review [examples](+D:\work\Client\Tools\ZeroBraneStudio-1.40\cfg\user-sample.lua) or check [online documentation](http://studio.zerobrane.com/documentation.html) for details.
--]]--
-- to automatically open files requested during debugging
editor.autoactivate = true
editor.fontsize = 14 -- this is mapped to ide.config.editor.fontsize
editor.fontname = "Consolas"
@eriseven
eriseven / 0_reuse_code.js
Created January 21, 2017 02:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@eriseven
eriseven / unpack_plist.py
Created March 1, 2017 03:12 — forked from wonkwh/unpack_plist.py
extract image from plist,png file created by texturepacker
#/usr/local/bin/python
import os,sys
from xml.etree import ElementTree
from PIL import Image
def tree_to_dict(tree):
d = {}
for index, item in enumerate(tree):
if item.tag == 'key':
if tree[index+1].tag == 'string':
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = YES
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
APPLE_INTERNAL_DIR = /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
@eriseven
eriseven / SharpNavTest.cs
Created July 1, 2017 14:05 — forked from unitycoder/SharpNavTest.cs
Using SharpNav.dll with Unity
using SharpNav;
using SharpNav.Geometry;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Vector3 = UnityEngine.Vector3;
public class SharpNavTest : MonoBehaviour
{
// assign your mesh here, try the example mesh provided in https://github.com/Robmaister/SharpNav/blob/96ddd939f292a4f4e76b460c1f783cdf1e9bcf41/Source/SharpNav.Examples/nav_test.obj
Shader "Custom/CelShadingForward" {
Properties {
_Color("Color", Color) = (1, 1, 1, 1)
_MainTex("Albedo (RGB)", 2D) = "white" {}
}
SubShader {
Tags {
"RenderType" = "Opaque"
}
LOD 200
@eriseven
eriseven / dissolve.shader
Created December 13, 2017 12:40 — forked from nukeop/dissolve.shader
Dissolve shader for Unity
Shader "Unlit/DissolveEffectShader"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_NoiseTex ("Texture", 2D) = "white" {}
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
_EdgeColour1 ("Edge colour 1", Color) = (1.0, 1.0, 1.0, 1.0)
_EdgeColour2 ("Edge colour 2", Color) = (1.0, 1.0, 1.0, 1.0)
_Level ("Dissolution level", Range (0.0, 1.0)) = 0.1