Make sure everything is up to date.
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
find . -name "*.jpg" -print0 | xargs -0 -I filename jpegtran -copy none -optimise -progressive -outfile filename filename |
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
curl -o .git/hooks/post-commit https://gist.github.com/lucasmotta/4636472/raw/29efcf2a4bf2bec7901b022b7d1f9c0300cd0279/post-commit.sh && sudo chmod 755 .git/hooks/post-commit |
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
info: Creating snapshot 0.0.1-1 | |
info Uploading: [=============================] 100% | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
help: For help with this error contact Nodejitsu Support: | |
help: webchat: <http://webchat.nodejitsu.com/> | |
help: irc: <irc://chat.freenode.net/#nodejitsu> | |
help: email: <support@nodejitsu.com> | |
help: | |
help: Copy and paste this output to a gist (http://gist.github.com/) |
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
parseMustache = (str, obj) -> | |
str.replace /{{\s*([\w\.]+)\s*}}/g, (tag, match) -> | |
nodes = match.split(".") | |
current = obj | |
for node in nodes | |
try | |
current = current[node] | |
catch | |
return "" | |
current |
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
/** | |
The following script works like this: | |
1. Auto play the game | |
2. Get all the color elements (<span>) inside the game | |
3. Push the elements to different arrays based on it's color | |
i.e: | |
– If it's a "red" color, goes to the "red" array | |
– If it's a "blue" color, goes to the "blue" array | |
4. Check each of those arrays has only one element, which is the one that | |
has a different/unique color compared to the others |
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
find . -type d -perm 777 -exec chmod 755 {} \; |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
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="box-grey"></div> | |
<div class="box-rounded"></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
find . -type d -empty -delete |