For discussions on DefinitelyTyped/DefinitelyTyped/pull/28890
- Install dependencies
$ npm install
- Compile
index.ts
and you'll see no error.
$ npm install
index.ts
and you'll see no error.### S3 implementation of Paperclip module that supports deep | |
### cloning of objects by copying image attachments. | |
### | |
### Tested with: aws-sdk (1.33.0) | |
### | |
### Refer to Paperclip issue: https://github.com/thoughtbot/paperclip/issues/1361#issuecomment-39684643 | |
### Original gist works with fog: https://gist.github.com/stereoscott/10011887 | |
### gist works from which this code is derived: https://gist.github.com/ksin/7747334d60b1947f14e9 | |
module Paperclip |
#!/usr/bin/ruby | |
# Convert a Markdown README to HTML with Github Flavored Markdown | |
# Github and Pygments styles are included in the output | |
# | |
# Requirements: json gem (`gem install json`) | |
# | |
# Input: STDIN or filename | |
# Output: STDOUT | |
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file | |
# cat README.md | flavor > README.html |
;; `lexical-binding' must be non-nil | |
(defun add-onetime-hook (hook function &optional append local) | |
"Add to the value of HOOK the function FUNCTION for onetime use. | |
HOOK should be a symbol, and FUNCTION may be any valid function. | |
See `add-hook'." | |
(labels ((wrapper () | |
(funcall function) | |
(remove-hook hook #'wrapper))) | |
(add-hook hook #'wrapper append local))) |
function permutations(arr) { | |
var result = []; | |
function remove(arr, index) { | |
return arr.filter(function(_, i) { | |
return index !== i; | |
}); | |
} | |
function rec(arr, acc) { |
# A trivial code for The Cue Programming Challenge | |
# URL: http://challenge.cueup.com/ | |
# Level 1: The Longest Substring That Is The Same In Reverse | |
def filter_candidates(src_text): | |
"""Pick all the candidate substrings from the text.""" | |
candidates = [] | |
for i in range(len(src_text)): |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Mojolicious::Lite; | |
use OAuth::Lite::Consumer; | |
use OAuth::Lite::Token; | |
use JSON; |
# A trivial code for solving the Colossal Cue Adventure | |
# URL: http://adventure.cueup.com/ | |
# Level 1: The VAX's MTH$RANDOM % 36 Roulette | |
def vax_rng_next(x): | |
"""Generate the next pseudo-random number.""" | |
a, c, m = 69069, 1, 2**32 | |
return (a * x + c) % m |