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
set clickDelay to 0.3 | |
set textReplaceList to {} | |
set exponentsListName to "Exponents (replaces ^0-^9 with ⁰-⁹)" | |
set fractionsListName to "Fractions (replaces 1/2-7/8 with ½-⅞)" | |
set exponentsList to {{"^0", "⁰"}, {"^1", "¹"}, {"^2", "²"}, {"^3", "³"}, {"^4", "⁴"}, {"^5", "⁵"}, {"^6", "⁶"}, {"^7", "⁷"}, {"^8", "⁸"}, {"^9", "⁹"}} | |
set fractionsList to {{"1/2", "½"}, {"1/3", "⅓"}, {"1/4", "¼"}, {"1/5", "⅕"}, {"1/6", "⅙"}, {"1/7", "⅐"}, {"1/8", "⅛"}, {"1/9", "⅑"}, {"1/10", "⅒"}, {"2/3", "⅔"}, {"2/5", "⅖"}, {"3/4", "¾"}, {"3/5", "⅗"}, {"3/8", "⅜"}, {"4/5", "⅘"}, {"5/6", "⅚"}, {"5/8", "⅝"}, {"7/8", "⅞"}} | |
set chosenLists to (choose from list {exponentsListName, fractionsListName} with title "Useful Keyboard Text Shortcuts" with prompt "Choose one or more sets of keyboard text shortcuts to add to your System Preferences. | |
This may take a minute to complete." OK button name "Add text shortcuts" cancel button name "Cancel" default items {exponentsListName, fractionsListName} with multiple selections allowed) |
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
# | |
# Example of a user's .screenrc file | |
# | |
# This is how one can set a reattach password: | |
# password ODSJQf.4IJN7E # "1234" | |
# no annoying audible bell, please | |
vbell on |
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
;; Original example (in Javascript) at: http://code.shutterstock.com/rickshaw/examples/lines.html | |
(def graph-with-legend | |
(let [series-data (array (array) (array) (array)) | |
random (Rickshaw.Fixtures.RandomData. 150)] | |
(dotimes [i 150] | |
(.addData random series-data)) | |
(doto | |
(Rickshaw.Graph. (clj->js {:element (.getElementById js/document "chart") | |
:renderer "line" | |
:width 960 |
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
#import <Foundation/Foundation.h> | |
#import <QuartzCore/QuartzCore.h> | |
// generate a UIColor from rgb and alpha values | |
#define RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a] | |
#define RGB(r, g, b) RGBA(r, g, b, 1.0) | |
// generate a UIColor | |
#define GRAYSCALEA(rgb, a) RGBA(rgb, rgb, rgb, a) | |
#define GRAYSCALE(rgb) GRAYSCALEA(rgb, 1.0) | |
// generate a UIColor from a hex and an alpha value |
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
# Five lines of code that will make your underscore + CoffeeScript use cleaner. | |
# Creates an underscore function for each function in to_reverse with R (short for Reversed) appended to the name. | |
# The R version moves the function argument (first argument in normal underscore) to the end, | |
# so you can write: | |
$(window).scroll _.throttleR 500, -> | |
console.log "This print's at most every 500ms" | |
# Instead of: | |
$(window).scroll _.throttle -> | |
console.log "This prints at most every 500ms too" |
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 'digest' | |
class BitcoinAddressValidator < ActiveModel::EachValidator | |
def validate_each(record, field, value) | |
unless value.blank? || valid_bitcoin_address?(value) | |
record.errors[field] << "Bitcoin address is invalid" | |
end | |
end | |
private |
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
### | |
Module dependencies | |
### | |
require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
express = require 'express' | |
app = module.exports = express.createServer() | |
RedisStore = require 'connect-redis' |
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
INSERT INTO 'snippets' ('title', 'body') VALUES | |
(':+1:', '👍'), | |
(':-1:', '👎'), | |
(':100:', '💯'), | |
(':1234:', '🔢'), | |
(':8ball:', '🎱'), | |
(':a:', '🅰'), | |
(':ab:', '🆎'), | |
(':abc:', '🔤'), | |
(':abcd:', '🔡'), |
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
#GUID Settings | |
$guidChangePassword = new-object Guid ab721a53-1e2f-11d0-9819-00aa0040529b | |
$guidLockoutTime = new-object Guid 28630ebf-41d5-11d1-a9c1-0000f80367c1 | |
$guidPwdLastSet = new-object Guid bf967a0a-0de6-11d0-a285-00aa003049e2 | |
$guidComputerObject = new-object Guid bf967a86-0de6-11d0-a285-00aa003049e2 | |
$guidUserObject = new-object Guid bf967aba-0de6-11d0-a285-00aa003049e2 | |
$guidLinkGroupPolicy = new-object Guid f30e3bbe-9ff0-11d1-b603-0000f80367c1 | |
$guidGroupPolicyOptions = new-object Guid f30e3bbf-9ff0-11d1-b603-0000f80367c1 | |
$guidResetPassword = new-object Guid 00299570-246d-11d0-a768-00aa006e0529 |
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
for row in $(curl https://api.github.com/repositories/72685026/contents/articles | jq -c -r '.[] | select(.type | contains("dir")) | "\(.name)"'); do wget -O "${row}.pdf" "https://docs.microsoft.com/en-us/azure/opbuildpdf/${row}/toc.pdf?branch=live"; done |