Skip to content

Instantly share code, notes, and snippets.

@EmperorEarth
EmperorEarth / gist:6337dd6243dc5315ad12
Created November 8, 2015 07:49
clutch toggle csgo
alias "clutchtoggle" "clutchon"
alias "clutchon" "voice_scale 0; say_team ---; alias clutchtoggle clutchoff"
alias "clutchoff" "voice_scale 1; say_team ---; alias clutchtoggle clutchon"
bind "y" "clutchtoggle"
@EmperorEarth
EmperorEarth / gist:4ded6b3f29555dac5c94
Created January 23, 2016 18:54 — forked from Zirak/gist:3086939
xhr for dummies

So, you want to send a motherfucking XMLHttpRequest (XHR, or commonly and falsly known as AJAX.) Too bad, just ran out of motherfucking XMLHttpRequests; but I still have one regular. XHR is not magic. It does not autofuckinmagically send things the way you want them do be sent. It does not do the thinking for you. It just sends an Http Request.

You get a hold on such a prime beast like this:

import React from 'react'
export function funcA(state, action) {
// do stuff
return state_new
}
@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
@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 / 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 / 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 / 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
/** @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');
.
├── actions
├── stores
├── views
│   ├── Anonymous
│   │   ├── __tests__
│   │   ├── views
│   │   │   ├── Home
│   │   │   │   ├── __tests__
│   │   │   │   └── Handler.js