This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*================================================== | |
= Bootstrap 3 Media Queries = | |
==================================================*/ | |
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ng-app="*"> | |
<head> | |
<title>Title</title> | |
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"> | |
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css"> | |
<link rel="stylesheet" href="site.css" type="text/css"> | |
</head> | |
<body ng-controller="*"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add to Preferences > Key Bindings - User | |
// see http://stackoverflow.com/a/26619524 for context | |
{ "keys": ["tab"], "command": "expand_abbreviation_by_tab", | |
"context": [ | |
{ | |
"operand": "source.js", | |
"operator": "equal", | |
"match_all": true, | |
"key": "selector" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget http://wordpress.org/latest.tar.gz | |
tar xfz latest.tar.gz | |
mv wordpress/* ./ | |
rmdir ./wordpress/ | |
rm -f latest.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To install virtualenv via pip | |
$ pip3 install virtualenv | |
Note that virtualenv installs to the python3 directory. For me it's: | |
$ /usr/local/share/python3/virtualenv | |
Create a virtualenvs directory to store all virtual environments | |
$ mkdir somewhere/virtualenvs | |
Make a new virtual environment with no packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic proof of concept. | |
* - Hot reloadable | |
* - Stateless stores | |
* - Stores and action creators interoperable with Redux. | |
*/ | |
import React, { Component } from 'react'; | |
export default function dispatch(store, atom, action) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["react", "es2015", "stage-0"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux'; | |
import { provide, connect } from 'react-redux'; | |
import thunk from 'redux-thunk'; | |
const AVAILABLE_SUBREDDITS = ['apple', 'pics']; | |
// ------------ | |
// reducers | |
// ------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pr1 = new Promise((resolve, reject) => { | |
setTimeout(function () { | |
resolve([1,3,4,46,234,33,4,536]); | |
}, 500); | |
}) | |
var pr2 = new Promise((resolve, reject) => { | |
setTimeout(function () { | |
resolve(20); | |
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* First letter of a string converted into uppercase | |
*/ | |
String.prototype.capitalizeFirstLetter = function () { | |
return this | |
.charAt(0) | |
.toUpperCase() + this.slice(1); | |
} | |
/** |
OlderNewer