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
<svg width="300" height="200"> | |
<polygon points="100,10 40, 129 222, 198 190,198" /> | |
</svg> |
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 person = "name=Joe;age=34;location=Texas;hobby=soccer"; | |
var ca = person.split(';'); | |
var obj = {}; | |
for (var i= 0; i<ca.length; i++){ | |
var loc = ca[i].indexOf('='); | |
var p = ca[i].slice(0, loc); | |
eval("obj." + p + " = '" + ca[i].slice(loc+1) + "'"); | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
table>thead(>tr>th{column $}*4)+tbody(>tr*5>td{data $}*4) | |
*/ | |
<table> | |
<thead> | |
<tr> | |
<th>column 1</th> | |
<th>column 2</th> | |
<th>column 3</th> | |
<th>column 4</th> |
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
<style> | |
.tech-name span { | |
border:1px solid #eee; | |
padding: 4px; | |
background-color: lightgrey; | |
border-radius: 2px; | |
box-shadow: 2px 2px 2px #aaa; | |
} | |
.tech-name span:hover { |
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
export class Place { | |
currentUser : string; | |
siteUri: string; | |
config: string; | |
static Place.getConfig():string { | |
return "myID"; | |
}; | |
constructor(config: string){ | |
this.config = this.getConfig(); |
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
class Form extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {value: 0}; | |
this.handleChange = this.handleChange.bind(this); | |
this.incrementValue = this.incrementValue.bind(this); | |
this.decrementValue = this.decrementValue.bind(this); | |
} | |
handleChange(event) { |
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 | |
# for dealing with all github repos related to npm packages, you basically clone into a directory you name | |
# install all related npm packages, open your favorite editor for that directory, and run your npm start or whatevever running script you had | |
# either npm start or npm run dev etc... | |
git clone $1 $2 | |
cd $2 | |
npm install | |
sublime . |
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 | |
value=$(<$1) | |
echo "$value" |
OlderNewer