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
Here is a list of scopes to use in Sublime Text 2 snippets - | |
ActionScript: source.actionscript.2 | |
AppleScript: source.applescript | |
ASP: source.asp | |
Batch FIle: source.dosbatch | |
C#: source.cs | |
C++: source.c++ | |
Clojure: source.clojure | |
CoffeeScript: source.coffee |
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
html { | |
background: url(image url) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
height: 100%; | |
overflow: hidden; | |
} |
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
#!/usr/bin/env bash | |
echo ">>> Starting Install Script" | |
# Update | |
sudo apt-get update | |
# Install MySQL without prompt | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
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
<?php | |
// use DateTime object to turn any format of date & time into standard form | |
//Example1 | |
$date = DateTime::createFromFormat('m/d/y @ h:ia', '04/04/2014 @ 3.13pm')->getTimestamp(); | |
//Example2 | |
$date = DateTime::createFromFormat('YmdHis', '20130312000000')->getTimestamp(); |
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
<?php | |
header('Content-Type: application/json'); | |
//$xmlfile = 'xml/EIT_00002_20140507.xml'; | |
function xml2json($file) { | |
if (file_exists($file)) { | |
$xml = simplexml_load_file($file); | |
$date = $xml->EventDate; |
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
[ | |
{ | |
"event": { | |
"key": "world.2014", | |
"title": "World Cup 2014" | |
}, | |
"round": { | |
"pos": 1, | |
"title": "Matchday 1", | |
"start_at": "2014\/06\/12", |
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
esteWatch: | |
options: | |
dirs: [ | |
'<%= app_path %>/**/' # Set all directories here | |
] | |
livereload: | |
enabled: true | |
extensions: ['html', 'css', 'php', 'twig'] # File extensions to be watched | |
port: 8888 # set vagrant forwarded_port number, default is 35729 |
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
(function(){ | |
/* Todo: fix performance */ | |
angular.module('app', []) | |
.controller('mainCtrl', function($scope){ | |
$scope.countries = [ | |
{ country: 'Japan', language: 'Japanese' }, | |
{ country: 'Korea', language: 'Korean' }, | |
{ country: 'North Korea', language: 'Korean'}, | |
{ country: 'China', language: 'Chinese'}, | |
{ country: 'Hong Kong', language: 'Cantonese'}, |
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
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<button class="btn btn-primary" onClick="render()">Render</button> | |
<button class="btn btn-danger" onClick="unmount()">Unmount</button> | |
</div> | |
<br/><br/> | |
<div class="col-xs-12" id="react"></div> | |
</div> | |
</div> |
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
(function(exports) { | |
'use strict'; | |
var Slider = React.createClass({ | |
getDefaultProps: function() { | |
return { | |
redVal: '', | |
greenVal: '', | |
blueVal: '' |
OlderNewer