I hereby claim:
- I am jletourneau on github.
- I am jlet (https://keybase.io/jlet) on keybase.
- I have a public key whose fingerprint is 4B2D AA0A 3C84 DD6C 05D5 DA48 C307 2D17 4882 FA40
To claim this, I am signing this object:
(defun unfill-region (start end) | |
"Unfill the current region; i.e. remove all newlines within paragraphs. | |
If an active region is not present, unfill the entire buffer." | |
(interactive "r") | |
(let ((fill-column (point-max))) | |
(if (use-region-p) | |
(fill-region start end) | |
(fill-region (point-min) (point-max))))) |
global mute_time | |
global wait_complete | |
on run | |
display dialog "Mute for how many seconds?" default answer "120" | |
set mute_time to text returned of result as number | |
set volume with output muted | |
set wait_complete to 0 | |
I hereby claim:
To claim this, I am signing this object:
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS text gradient</title> | |
<style type="text/css"> | |
h1 { | |
display: inline; | |
font: bold 72px 'Helvetica Neue', Helvetica, sans-serif; | |
line-height: 1; |
tell application "Finder" | |
eject (every disk whose ejectable is true) | |
end tell |
This documentation explains how to build Hydra profile support into an existing game. As our example, we’ll be working with a very simple “game” called Masher, written in Python, which prompts the user for their name, reads lines of input one at a time, and adds up the number of characters the user has entered.
The original version of the game stores the user’s name, rounds played, and count of characters typed in a data structure which is saved to a file on disk using Python’s pickle module. Our goal is to modify this game to store the player’s data in Hydra instead.
#!/usr/bin/env python | |
import sys, os, pickle | |
from collections import defaultdict | |
class Masher: | |
def __init__(self, savefile): | |
self._savefile = savefile | |
self._read_profile() |
#!/usr/bin/env python | |
import subprocess, re | |
def battery_info(): | |
ioreg = subprocess.check_output( | |
['ioreg', '-r', '-w0', '-cAppleSmartBattery'] | |
).split("\n") | |
d = dict() | |
for line in ioreg: |
import utils | |
@utils.memoize | |
def fib(n): | |
if n < 3: | |
return 1 | |
return fib(n - 2) + fib(n - 1) | |
(i, sum) = (1, 0) | |
while True: |
def iecc_visible(condition, &block) | |
output = capture_haml(&block) | |
"<!--[#{condition}]><!-->#{output.chomp}<!--<![endif]-->\n" | |
end |