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
| $("td.days").each(function() { | |
| $this = $(this) | |
| var value = $this.html(); | |
| if (value<2) { $this.addClass('success');} | |
| else if (value<5) { $this.addClass('warning');} | |
| else { $this.addClass('danger');} | |
| }); |
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
| curl -H "Content-Type: application/json" \ | |
| -X POST \ | |
| -d "{\"message\": \"hello\" }" \ | |
| https://api.hipchat.com/v2/user/433057/message?auth_token=4gZZzsXQY75pZHhfnnujKHT8F101LWzcwGPu4jUV |
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
| #! /bin/bash | |
| cd envoy-web/ | |
| git pull | |
| vagrant up | |
| vagrant ssh |
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
| <ul> | |
| <% Stripe::Event.all(:type => "charge.succeeded").each do |stripe_event| %> | |
| <li><%= Stripe::Customer.retrieve(stripe_event.data.object.customer).description %></li> | |
| <li><%= number_to_currency(stripe_event.data.object.amount / 100.00) %></li> | |
| <% end %> | |
| </ul> |
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_restore dumpfile >plaintext.sql | |
| iconv -c -f UTF-8 -t UTF-8 <plaintext.sql >plaintext-cleaned.sql | |
| psql dbname < plaintext-cleaned.sql | |
| COPY table TO 'data.csv' DELIMITER ',' CSV HEADER; |
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
| function processInbox() { | |
| // get all threads in inbox | |
| var threads = GmailApp.getInboxThreads(); | |
| for (var i = 0; i < threads.length; i++) { | |
| // get current active Google Docs spreadsheet | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| // get subject, to, from and date of 1st message in thread | |
| sheet.appendRow([threads[i].getMessages()[0].getSubject(), threads[i].getMessages()[0].getTo(), threads[i].getMessages()[0].getFrom(), threads[i].getMessages()[0].getDate()]); | |
| Utilities.sleep(1000); | |
| } |
NewerOlder