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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "cmd+k cmd+c", | |
"command": "editor.action.addCommentLine", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "cmd+k cmd+c", | |
"command": "-editor.action.addCommentLine", |
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 flattenMyArr(nArr) { | |
for (let i = 0; i < nArr.length; i++) { | |
if (Array.isArray(nArr[i])) { | |
flattenMyArr(nArr[i]) | |
} else { | |
flatArr.push(nArr[i]) | |
} | |
} | |
return flatArr; | |
} |
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
on run {input, parameters} | |
tell application "Terminal" | |
if not (exists window 1) then reopen | |
activate | |
do script "test1" in window 1 | |
delay 2 | |
close window 1 | |
end tell | |
return input |
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
ps -ef | grep jboss | grep -v grep | awk '{print $2}' | xargs kill -9 |
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
lsof -i:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9 | |
echo "port $1 has been terminated" |
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" |
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
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
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
<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 { |
NewerOlder