Skip to content

Instantly share code, notes, and snippets.

# Always create a new session. If there's no session running when doing
# "attach" this will automatically create one for us.
new-session -s default
# This disables the output of the source command on startup.
set quiet on
# Start the powerline daemon if not already started.
run-shell "powerline-daemon -q"
@sryze
sryze / styles.less
Last active December 30, 2015 08:07
Customize the font size of Atom's file tree and tab bar
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@sryze
sryze / config.cson
Last active August 29, 2015 14:13
Atom config
'*':
'editor':
'fontFamily': 'Droid Sans Mono'
'fontSize': 13
'autoIndentOnPaste': false
'tabLength': 4
'softTabs': false
'invisibles': {}
'core':
'themes': [
@sryze
sryze / euler1.js
Last active August 29, 2015 14:25
Project Euler in JavaScript
var END_OF_WORLD = 'undefined';
function nextNumber(n) {
return n + 1;
}
function numbers(base) {
var n = base;
return function() {
return (n = nextNumber(n));
{
"cursor_size": "small",
"font_face": "Consolas",
"font_size": "0x16",
"popup_colors": "dark_magenta,white",
"dark_gray": "#808080",
"screen_colors": "gray,black",
"dark_green": "#008000",
"window_size": "95x27",
"font_weight": 700,
1 # SDK tools
2 export PATH=$PATH:$ANDROID_SDK_ROOT/tools
3 export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
4
5 # Other tools
6 export PATH=$PATH:$ANDROID_SDK_HOME/repo/bin
7 export PATH=$PATH:$ANDROID_SDK_HOME/gradle/bin
8
9 adb_pull_with_basename() {
10 adb pull "$1" "$2/$(basename $1)"
@sryze
sryze / proxy
Last active September 3, 2023 10:20
Quickly toggle HTTP(S) proxy on Mac OS X from command line
#!/bin/sh
SERVICE="Ethernet" # or "Wi-Fi"
PROXY_HOST="127.0.0.1"
PROXY_PORT="8888"
while [[ $# > 0 ]]
do
case "$1" in
on)
@sryze
sryze / wwdc_video_urls.js
Last active July 16, 2016 15:10
Extracts URLs of WWDC videos
// WWDC 2012
jQuery("a:contains('HD')").each(function(n){ console.log(jQuery(this).attr("href") ) })
// WWDC 2013/2014
jQuery("a:contains('HD')").each(function(n){ console.log(jQuery(this).attr("href") + "?dl=1" ) })
@sryze
sryze / PostBuild.cs
Created March 8, 2017 04:25
Modify Xcode project after build in Unity
#if UNITY_EDITOR
using System;
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.XcodeNew;
public class PostBuild {
@sryze
sryze / UITableViewBounceBackground.m
Last active June 9, 2017 11:06
Cover bounce area in UITableView / UIScrollView
- (void)layoutBounceBackground {
// Change position and height of the bounce background view in order to cover the scroll view
// bounce area. This is necessary because of UITableView glitches in section and row animations
// during which you can see its (white) background in the middle of the table (with dark cells).
CGFloat contentHeight = self.tableView.contentSize.height;
CGFloat contentOffsetY = self.tableView.contentOffset.y;
CGFloat height = self.tableView.frame.size.height;
if (contentOffsetY >= 0 && contentOffsetY <= contentHeight - height) {