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 Dnscell.Collections.Domains extends Backbone.Collection | |
url: "/api/zones" | |
model: Dnscell.Models.Domain |
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
#in my controller | |
def update | |
user = current_user.update_attributes(params[:user]) | |
respond_with user | |
end | |
#in my backbone view | |
@model.url = '/api/users' |
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
Started POST "/api/hosts" for 127.0.0.1 at 2012-05-24 16:42:26 +0800 | |
Processing by Api::HostsController#create as JSON | |
Parameters: {"subdomain"=>"oh", "domain"=>"aik.com", "service"=>"4", "domain_id"=>"aik.com", "host"=>{"domain"=>"aik.com", "subdomain"=>"oh", "service"=>"4"}} | |
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 3 LIMIT 1 | |
(0.1ms) BEGIN | |
Host Load (0.2ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1 | |
CACHE (0.0ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1 | |
CACHE (0.0ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1 | |
CACHE (0.0ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`reference1` = 'aik.com' LIMIT 1 | |
oh.aik.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
#!/bin/sh | |
#PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
set -e | |
PATH=$PATH:$HOME/.rvm/bin | |
# Feel free to change any of the following variables for your app: | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=/home/system/deploy | |
PID=$APP_ROOT/daemonize.god.pid | |
CMD="cd $APP_ROOT; god -c daemonize.god -P daemonize.god.pid" | |
AS_USER=system |
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
/Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.rb:4: [BUG] Segmentation fault | |
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.4.0] | |
-- control frame ---------- | |
c:0075 p:0011 s:0301 b:0300 l:000299 d:000299 CLASS /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r | |
c:0074 p:0011 s:0298 b:0298 l:000297 d:000297 CLASS /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r | |
c:0073 p:0011 s:0296 b:0296 l:000295 d:000295 CLASS /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r | |
c:0072 p:0009 s:0294 b:0294 l:000293 d:000293 TOP /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r | |
c:0071 p:---- s:0292 b:0292 l:000291 d:000291 FIN |
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
// 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 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
products = []; | |
$.each( $(".directory-list > div") , function(i,v){ | |
product = { | |
company: $(v).find("div.fldcomp_add2").text().split(":")[1], | |
product: $(v).find("div.comp_name").text(), | |
expirary: $(v).find("div.fldcomp_date").text().split(":")[1] | |
}; | |
console.log( product ); | |
products.push(product); | |
}) |
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
SYNC_FILE () { | |
#check for rsync binary | |
if [[ -z $(whereis -qb rsync) ]]; then | |
echo "fatal error: rsync not found." | |
exit 1 | |
fi | |
echo "Begin rsync.." | |
#run rsync to sync with remote server. | |
rsync -azP --prune-empty-dirs --include="*/" --include="*.slave" --exclude="*" $LOCAL_PATH system@$SERVER:$REMOTE_PATH |
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
[system@dnsv2node1 ~]$ puppet agent -tv | |
Info: Using configured environment 'production' | |
Info: Retrieving pluginfacts | |
Info: Retrieving plugin | |
Info: Loading facts | |
Info: Caching catalog for dnsv2node1.local | |
Info: Applying configuration version '1549859973' | |
Error: /Stage[main]/Dnsvault::Settings::Networks::Interfaces/File[/home/system/settings/networks/interfaces.json]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///configs/dnsv2node1.local/settings/networks/interfaces.json | |
Notice: /Stage[main]/Dnsvault::Settings::Networks::Interfaces/Exec[reload_networking]: Dependency File[/home/system/settings/networks/interfaces.json] has failures: true | |
Warning: /Stage[main]/Dnsvault::Settings::Networks::Interfaces/Exec[reload_networking]: Skipping because of failed dependencies |
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
#modal-vue | |
modal v-if="showModal" @close="showModal = false" | |
script type="text/x-template" id="modal-template" ref="modal" | |
transition name="modal" | |
.modal-mask | |
.modal-wrapper | |
div class="w-2/3 modal-container" | |
.modal-header | |
slot name="header" |
OlderNewer