Based on this: http://blennd.com/post/the-pains-of-installing-tmux-on-a-shared-server/ Script forked from https://gist.github.com/shime/5706655/
- gcc
- wget
| (function addXhrProgressEvent($) { | |
| var originalXhr = $.ajaxSettings.xhr; | |
| $.ajaxSetup({ | |
| progress: function() { console.log("standard progress callback"); }, | |
| xhr: function() { | |
| var req = originalXhr(), that = this; | |
| if (req) { | |
| if (typeof req.addEventListener == "function") { | |
| req.addEventListener("progress", function(evt) { | |
| that.progress(evt); |
| (ns express_sample | |
| (:require [cljs.nodejs :as node])) | |
| (def express (node/require "express")) | |
| (def app (. express (createServer))) | |
| (defn -main [& args] | |
| (doto app | |
| (.use (. express (logger))) | |
| (.get "/" (fn [req res] |
| app.filter('bytes', function() { | |
| return function(bytes, precision) { | |
| if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
| if (typeof precision === 'undefined') precision = 1; | |
| var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
| number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
| return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
| } | |
| }); |
| #!/bin/bash | |
| ### User Settings (things you must set) | |
| ## Location of the dnscurl.pl script | |
| DNSCurl="/path/to/route53DynDNS/dnscurl.pl" | |
| ## The host name you wish to update/create | |
| myHostName="*" | |
| ## Zone/domain in which host (will) reside(s) | |
| myDomainName="example.com" |
| // add the filter to your application module | |
| angular.module('myApp', ['filters']); | |
| /** | |
| * Filesize Filter | |
| * @Param length, default is 0 | |
| * @return string | |
| */ | |
| angular.module('filters', []) | |
| .filter('Filesize', function () { |
Based on this: http://blennd.com/post/the-pains-of-installing-tmux-on-a-shared-server/ Script forked from https://gist.github.com/shime/5706655/
| [ | |
| // Use paste and indent as default paste mechanism, | |
| // this conserves your indentation and it's overall better. | |
| // original paste is now ctrl+shift+v | |
| { | |
| "keys": ["ctrl+v"], | |
| "command": "paste_and_indent" | |
| }, { | |
| "keys": ["ctrl+shift+v"], | |
| "command": "paste" |
| package main | |
| import ( | |
| "encoding/base64" | |
| "net/http" | |
| "strings" | |
| ) | |
| type handler func(w http.ResponseWriter, r *http.Request) |
| #!/bin/zsh | |
| echo 'Press any key to continue...'; read -k1 -s |
| // First, get the unit number. | |
| const getUnitNumber = fetch('https://www.lds.org/mobiledirectory/services/ludrs/1.1/mem/mobile/current-user-unitNo', { | |
| credentials: 'include', | |
| }) | |
| .then(response => response.json()) | |
| .then(response => response.message); | |
| // Then download all contacts. | |
| const getContacts = getUnitNumber.then(unitNumber => fetch(`https://www.lds.org/mobiledirectory/services/v2/ldstools/member-detaillist-with-callings/${unitNumber}`, { | |
| credentials: 'include', |