Skip to content

Instantly share code, notes, and snippets.

@Timber232
Timber232 / stickynote_font_fix.reg
Created April 21, 2015 14:12
Change font to consola (Windows Sticky Notes)
View stickynote_font_fix.reg
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Segoe Print (TrueType)"="consola.ttf"
"Segoe Print Bold (TrueType)"="consolab.ttf"
@Timber232
Timber232 / private.xml
Last active August 29, 2015 14:17
Karabiner TouchCursor Mode
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>TouchCursor</name>
<identifier vk_config="true">notsave.private_touchcursor</identifier>
<!-- IJKL -->
<autogen>--KeyToKey-- KeyCode::J, KeyCode::CURSOR_LEFT</autogen>
<autogen>--KeyToKey-- KeyCode::K, KeyCode::CURSOR_DOWN</autogen>
<autogen>--KeyToKey-- KeyCode::I, KeyCode::CURSOR_UP</autogen>
@Timber232
Timber232 / atom_dark_theme_scroll_fix.css
Last active October 17, 2018 03:29
Fix Atom's ugly scroll on third party dark themes
View atom_dark_theme_scroll_fix.css
/*
Taken from:
https://atom.io/themes/seti-ui
*/
.scrollbars-visible-always {
/deep/ ::-webkit-scrollbar {
width: 8px;
height: 8px;
}
View gist:8178a105d852fe178196
Wednesday, August 24, 2011
Configure PhpStorm to Auto-complete CakePHP Models, Views, and Controllers
After playing around a bit today I finally figured out how to get PhpStorm to auto-complete methods for models and controllers. Here's what you need to do.
Removing Multiple Definitions
First, let's tackle the multiple definitions problem that we see below.
View index.html
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
footer {
background-color: black;
color: white;
@Timber232
Timber232 / gd_icon_inverse.sh
Created October 23, 2014 02:25
Fix Google Drive menu icon in OS X Yosemite dark mode.
View gd_icon_inverse.sh
#!/bin/bash
resource_path="/Applications/Google Drive.app/Contents/Resources/";
bak=".bak";
normal_inverse="mac-normal-inverse.png";
normal_inverse_2x="mac-normal-inverse@2x.png";
normal="mac-normal.png";
normal_2x="mac-normal@2x.png";
@Timber232
Timber232 / Compact.php
Created August 27, 2013 19:27
PHP Compact
View Compact.php
<?php
$a = 'apple';
$b = 'bone';
$c = 'cat';
$compacted = compact('a', 'b', 'c');
var_dump($compacted);
/*
* Result:
@Timber232
Timber232 / Fibonacci.php
Created August 23, 2013 12:53
Fibonacci
View Fibonacci.php
<?php
echo 'Fibonacci';
echo '<br>';
/*
$temp1 + $temp2 = $tempTotal
00 + 01 = 1
01 + 00 = 1
01 + 01 = 2
02 + 01 = 3
@Timber232
Timber232 / Install package installer
Created January 7, 2012 22:34
Sublime Text 2 Package Manager
View Install package installer
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
"theme" : "Soda Dark.sublime-theme"