View mysqlfix.sh
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
#MySQL Client | |
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysql /usr/bin/mysql | |
#MySQL Dump | |
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysqldump /usr/bin/mysqldump | |
#How to fix the "Library not loaded: libmysqlclient.18.dylib (LoadError)" error | |
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib |
View harp-flatten-public-json-contents.html.ejs
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
<% const flattenPublicJSON = (obj = {}, res = [], extraKey = '/') => { | |
for(key in obj){ | |
if(Array.isArray(obj[key])){ | |
flattenPublicJSON(obj[key], res, `${extraKey}`); | |
}else if(key === '_contents'){ | |
res.push(`${extraKey}/${obj[key]}`); | |
} else if(key === '_data'){ | |
//ignore | |
} else if(typeof obj[key] !== 'object'){ | |
res.push(`${extraKey}${obj[key]}`); |
View LICENSE
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
Copyright (c) 2012 Heath Anderson | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE O |
View rom_name_fix.rb
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
#!/usr/bin/env ruby | |
require 'optparse' | |
options = {} | |
OptionParser.new do |opts| | |
opts.on('-d n', '--directory=n', 'Set Directory') do |d| | |
options[:directory] = d | |
end | |
opts.on('-h', '--help', 'Displays Help') do |
View app.rb
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
require 'gollum/frontend/app' | |
require 'digest/sha1' | |
class App < Precious::App | |
User = Struct.new(:name, :email, :password_hash) | |
before { authenticate! } | |
helpers do | |
def authenticate! |
View simplepolling.js
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
//Simple AJAX Polling jQuery Plugin | |
// example usage: | |
/* $.ajaxPoll({ | |
url: "/path", | |
type: "GET", | |
interval: 250, | |
maxAttempts: 25, | |
successCondition: function(result) { | |
return result != "processing"; | |
}, |
View sqlite_backup_to_cloudfiles.rb
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
require 'rubygems' | |
require 'cloudfiles' | |
require 'sqlite3' | |
cf = CloudFiles::Connection.new(:username => "", :api_key => "") | |
original = = SQLite3::Database.new('/var/www/project/current/db/original.db') | |
backup = SQLite3::Database.new('/home/deploy/backup.sqlite3') | |
backup_process = SQLite3::Backup.new(backup, 'main', original, 'main') |
View mysql_backup_to_cloudfiles.rb
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
require 'rubygems' | |
require 'cloudfiles' | |
cf = CloudFiles::Connection.new(:username => "", :api_key => "") | |
`mysqldump -u root --password=password --all-databases > /home/deploy/backup.sql` | |
file = File.new("/home/deploy/backup.sql") | |
if file |
View application.css
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
body { | |
background-color: #C5CCD6; /* Background color */ | |
color: #222; /* Foreground color used for text */ | |
font-family: Helvetica; | |
font-size: 14px; | |
margin: 0; /* Amount of negative space around the outside of the body */ | |
padding: 0; /* Amount of negative space around the inside of the body */ | |
-webkit-user-select: none; | |
overflow-x: hidden; | |
} |
View .gitignore
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
# RoR/Padrino | |
log/**/* | |
api/log/**/* | |
tmp/**/* | |
api/tmp/**/* | |
bin/* | |
vendor/gems/* | |
!vendor/gems/cache/ | |
.sass-cache/* | |
*.sqlite3 |
NewerOlder