Skip to content

Instantly share code, notes, and snippets.

@EmperorEarth
EmperorEarth / autoexec.cfg
Created June 24, 2016 14:28
Kevin's autoexec
// voice toggle for clutching
alias "clutchtoggle" "clutchon"
alias "clutchon" "voice_scale 0;cl_showfps 0;alias clutchtoggle clutchoff"
alias "clutchoff" "voice_scale 0.1;cl_showfps 1;alias clutchtoggle clutchon"
bind "mouse3" "clutchtoggle"
alias "voicetoggle" "voiceon"
alias "voiceon" "voice_enable 1;say_team voice_enable 1;alias voicetoggle voiceoff"
alias "voiceoff" "voice_enable 0;say_team voice_enable 0;alias voicetoggle voiceon"
bind "u" "voicetoggle"
@EmperorEarth
EmperorEarth / practice.cfg
Last active June 24, 2016 14:14
Kevin's practice cfg
// Server config
sv_cheats 1
mp_limitteams 0
mp_autoteambalance 0
mp_maxrounds 999
mp_roundtime 60
mp_roundtime_defuse 60
mp_maxmoney 60000
mp_startmoney 60000
mp_freezetime 0
@EmperorEarth
EmperorEarth / README.md
Created February 19, 2016 00:45 — forked from miku/README.md
git --track vs --set-upstream vs --set-upstream-to

README

Short excursion into git --track, --set-upstream and --set-upstream-to.

All examples use the aliases co for checkout and br for branch.

Setup:

$ git clone git@github.com:AKSW/OntoWiki.git

.
├── actions
├── stores
├── views
│   ├── Anonymous
│   │   ├── __tests__
│   │   ├── views
│   │   │   ├── Home
│   │   │   │   ├── __tests__
│   │   │   │   └── Handler.js
/** @jsx React.DOM */
'use strict';
var React = require("react/addons");
var _ = require("lodash");
var $ = require("jquery");
var AtomReact = require("atom-react");
var classNames = require('classnames');
@EmperorEarth
EmperorEarth / nginxondigitalcoean.sh
Created February 16, 2016 09:40 — forked from AlexZeitler/nginxondigitalcoean.sh
DigitalOcean snippets
sudo apt-get update
sudo apt-get install nginx
#default website
@EmperorEarth
EmperorEarth / what-forces-layout.md
Created February 10, 2016 04:11 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@EmperorEarth
EmperorEarth / builder.go
Created February 9, 2016 21:48 — forked from vaskoz/builder.go
Golang Builder pattern
package main
import "strconv"
import "fmt"
type Color string
type Make string
type Model string
const (
@EmperorEarth
EmperorEarth / gist:d9a711e3f4e6f225ffee
Created January 30, 2016 22:06
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@EmperorEarth
EmperorEarth / CREDIT
Last active February 1, 2016 17:05
React-Router's onEnter <> requireAuth read from Redux store
// Comment: http://stackoverflow.com/questions/33643290/how-do-i-get-a-hold-of-the-store-dispatch-in-react-router-onenter/34278483#34278483
// User: http://stackoverflow.com/users/184532/kjs3