Skip to content

Instantly share code, notes, and snippets.

View Partysun's full-sized avatar
🏠
Working from home

Yura Partysun

🏠
Working from home
View GitHub Profile
@Partysun
Partysun / .env
Created September 21, 2012 09:15 — forked from allanlei/.env
Sample local Heroku/Django development environment using foreman
DATABASE_URL=postgres://USERNAME:PASSWORD@127.0.0.1/DATABASE
MEMCACHE_SERVERS=127.0.0.1:11211
DJANGO_SETTINGS_MODULE=settings.development.local
@Partysun
Partysun / gmail-scrollbars.css
Created November 1, 2012 10:57 — forked from jambu/gmail-scrollbars.css
New Gmail like scrollbars for webkit browsers
/* Gmail style scrollbar */
::-webkit-scrollbar {
width: 12px
}
::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 2px
}
::-webkit-scrollbar-track {
border-width: 0
}
@Partysun
Partysun / game.yml
Created December 20, 2012 10:01
Config file for Teamocil (tmux)
session:
name: "MyGame"
windows:
- name: "web server"
root: "~/Developer/MyGame/Export/flash/bin/"
filters:
before:
- "python -m SimpleHTTPServer 8000"
splits:
[splits list]
@Partysun
Partysun / iptables.firewall.rules
Last active December 15, 2015 01:39
The following firewall rules will allow HTTP (80), HTTPS (443), SSH (44444), ping, and some other ports for testing. All other ports will be blocked.
*filter
# Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT
# Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow all outbound traffic - you can modify this to only allow certain traffic
@Partysun
Partysun / google-contact-clear.py
Created May 28, 2013 08:17
Delete fail contacts from google contact service Fail contact = doesn't have email or phone.
# -*- coding: utf-8 -*-
# Delete fail contacts from google contact service
# Fail contact = doesn't have email or phone.
import gdata.contacts.service
import gdata.contacts
import getpass
client = gdata.contacts.service.ContactsService()
client.email = raw_input('Please enter your email address')
client.password = getpass.getpass()
@Partysun
Partysun / Accelerometer Sample
Last active December 23, 2015 03:29
How to work with Gyroscope or Accelerometer in OpenFL
// Imports part...
#if mobile
import openfl.ui.Accelerometer;
#end
// Class var part...
public static var accelX:Float;
public static var accelY:Float;
public static var accelZ:Float;
@Partysun
Partysun / keyboard_event_openfl
Last active December 26, 2015 22:59
Detect the button on android, windows, linux, neco. OpenFL
import flash.ui.Keyboard;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.Lib;
public function new()
{
super();
#if (cpp || neko)
Lib.current.stage.addEventListener (KeyboardEvent.KEY_UP, stage_onKeyUp);
VoxEngine.addEventListener(CallEvents.Connected, handleCallConnected);
function handleCallConnected(e) {
// first call connected successfully, play message
Logger.write(call);
e.call.say("Hi, this call is test, please wait", Language.US_ENGLISH_FEMALE);
e.call.addEventListener(CallEvents.PlaybackFinished, function(e) { VoxEngine.terminate(); });
}
@Partysun
Partysun / README.md
Created February 4, 2017 18:58 — forked from erichrobinson/README.md
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable