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
| find . -name 'OLDFILENAMEPARTIAL*' -type f -exec bash -c 'mv "$1" "${1//OLDFILENAMEPARTIAL/NEWFILENAMEPARTIAL}"' -- {} \; |
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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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
| pg_dump -h localhost -U USERNAME -f backup.dump DATABASENAME -Fc | |
| pg_restore --verbose --clean --no-acl --no-owner -h localhost -U USERNAME -d DATABASENAME backup.dump |
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 hidden characters
| [ | |
| { "keys": ["super+h"], "command": "show_panel", "args": {"panel": "replace"} }, | |
| {"keys": ["super+shift+r"], "command": "reindent" , "args": {"single_line": false}}, | |
| { "keys": ["super+shift+."], "command": "erb", "context": | |
| [ | |
| { "key": "selector", "operator": "equal", "operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" } | |
| ] | |
| }, | |
| { "keys": ["alt+d"], "command": "goto_definition" }, | |
| { "keys": ["alt+g"], "command": "jump_back" } |
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
| class BlogController < ApplicationController | |
| def index | |
| path = params[:path].to_s | |
| source_url = 'http://yourblog.tumblr.com/' + path | |
| source_content_type = '' | |
| source_body = open(source_url) do |f| | |
| source_content_type = f.content_type # "text/html" | |
| f.read | |
| end | |
| if source_content_type == 'text/html' |