I hereby claim:
- I am robmiller on github.
- I am robmil (https://keybase.io/robmil) on keybase.
- I have a public key whose fingerprint is 56A1 8D07 7155 50C6 2AAF 00D1 6524 6485 80D1 168E
To claim this, I am signing this object:
tell application "Skim" | |
repeat with n from (count of documents) to 1 by -1 | |
set doc to document n | |
-- change "book-screen.pdf" to the filename of the PDF | |
-- that you want to refresh | |
if name of doc is "book-screen.pdf" then | |
revert doc | |
end if | |
end repeat | |
end tell |
I hereby claim:
To claim this, I am signing this object:
For this tutorial, we have the following brief. That is: to take a file that contains many millions of lines of text, each one of them a single column — something that looks like this:
POPLKLMNE
GKITLOPOM
QASSLKOPI
== snip ==
...into multiple text files, each with a fixed number of lines in them, each with — instead of one column per line — several columns, separated with a comma. In other words, something that looks like this:
POPLKLMNE,GKITLOPOM,QASSLKOPI
require "zlib" | |
class Png | |
class ChunkError < StandardError; end | |
attr_reader :filename, :file, :signature, :chunks | |
SIGNATURE = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a].pack("C8") | |
def initialize(filename) |
#!/usr/bin/env ruby | |
def run | |
ARGF.each_slice($options[:columns]) do |values| | |
puts values.map(&:chomp).join($options[:separator]) | |
end | |
end | |
require "optparse" |
use std::rand::{task_rng, Rng}; | |
use std::os; | |
use std::collections::hashmap::HashSet; | |
fn main() { | |
let num_threads = 8u; | |
let args = os::args(); | |
let usage = "Usage: code-generator NUMCODES CODEFORMAT"; |
struct PrimeStream { | |
current: int | |
} | |
impl PrimeStream { | |
fn new() -> PrimeStream { | |
PrimeStream { current: 1 } | |
} | |
} |
class Module | |
def attribute(attribute, &block) | |
case attribute | |
when Hash | |
name = attribute.keys.first | |
default = attribute[name] | |
when String, Symbol | |
name = attribute | |
default = nil | |
end |
#!/usr/bin/env ruby | |
require 'net/http' | |
require "json" | |
require "pathname" | |
require "logger" | |
class Slack | |
attr_reader :account, :token, :channel |
class<<Golf=Class.new | |
n=0;'a.reduce :* | |
(?a..?z).to_a | |
(1..a).reduce :* | |
a.map{|s|z=s[0];z==?m?"hat(#{s})":z==?d?s[0..-2]+"(bone))":"dead"+s[3..-1]} | |
(1..4).flat_map{|n|a.each_cons(n).to_a} | |
(1..a).map{|a|a%15<1?"fizzbuzz":a%3<1?"fizz":a%5<1?"buzz":a} | |
p=0;a.slice_before{|n|t=p+1<n;p=n;t}.map{|n|z="#{n[0]}";n.size>1?z+?-+"#{n[-1]}":z} | |
i,j=0,1;(1..a).map{i=j+j=i} | |
a.split.map{|s|s.size>10?s[0,4]+?.*3+s[-3,3]:s}.join" "' |