This file contains hidden or 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/zsh | |
# Check if xcode command line tools are installed | |
if ! [ "$(xcode-select -p)" ]; then | |
xcode-select --install | |
exit 1 | |
fi | |
echo "Getting the Pivotal workstation setup scripts." |
This file contains hidden or 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
.expertise-list-headline { | |
display: block; | |
text-align: center; | |
@include rem-fallback("padding-top", 1.25rem); | |
} | |
.expertise-list-content-container { | |
display: flex; | |
flex-wrap: wrap; | |
align-items: stretch; |
This file contains hidden or 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
shopt -s globstar | |
for f in **/*.d.js; do flowgen "$f" -o "${f%%.d.js}".flow.js; done |
This file contains hidden or 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 which processes are listening to which ports -- lsof -i | grep LISTEN | |
Show which process is running on a specific port -- lsof -i TCP:3000 |
This file contains hidden or 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 hidden or 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
atom-text-editor { | |
font-family: 'Fira Code'; | |
font-style: normal; | |
text-rendering: optimizeLegibility; | |
} | |
atom-text-editor::shadow { | |
.string.quoted, | |
.string.regexp { | |
-webkit-font-feature-settings: "liga" off, "calt" off; |
This file contains hidden or 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
static String toCamelCase( String text, boolean capitalized = false ) { | |
text = text.replaceAll( "(_)([A-Za-z0-9])", { Object[] it -> it[2].toUpperCase() } ) | |
return capitalized ? capitalize(text) : text | |
} | |
static String toSnakeCase( String text ) { | |
text.replaceAll( /([A-Z])/, /_$1/ ).toLowerCase().replaceAll( /^_/, '' ) | |
} | |
This file contains hidden or 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
""" | |
Usage: python script.py search_string replace_string dir | |
Eg. python batchreplace.py galleries productions /Sites/cjc/application/modules/productions/ | |
And it will search recursively in dir | |
and replace search_string in contents | |
and in filenames. | |
Case-sensitive | |
""" | |
from sys import argv |
NewerOlder