Skip to content

Instantly share code, notes, and snippets.

View 3en's full-sized avatar

Ben Reyes 3en

View GitHub Profile
@ciaranarcher
ciaranarcher / sublime_shortcuts.md
Last active February 18, 2016 08:25
Sublime Text 2 Shortcuts
</style>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" charset="UTF-8"></script>
<script type="text/javascript">
setTimeout(function(){
var email_confirmation = '<div style="margin-top: 12px;"><label for="email_confirmation">Email confirmation:<abbr title="Required">*</abbr></label><input id="email_confirmation" name="email_confirmation" required="required" title="Please fill out this field." type="email"><div class="validation error" id="conformation_validation" style="display: block;"></div></div>';
$(".two_across").append(email_confirmation);
$("#ticket_submission form").submit(function(e){
@lajunta
lajunta / autobackupmongo.rb
Created November 6, 2010 17:09
auto backup mongo (ruby version and very concise)
#!/usr/local/ruby/bin/ruby -w
Dbpath = "/data/db" # database path
Backpath = "/data/dbbackup" # backup directory
Host = "" # mongo host to connect,empty is for local
Database = "" # database to use. empty is for all
Collection = "" # collection to use
User = ""
Passwd = ""
Now = Time.now
DATE = Now.strftime("%Y-%m-%d")