Skip to content

Instantly share code, notes, and snippets.

Carl Youngblood cayblood

Block or report user

Report or block cayblood

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:193304
SICP Exercise 1.1
> 10
10
> (+ 5 3 4)
12
> (- 9 1)
8
> (/ 6 2)
3
View gist:193310
SICP Exercise 1.2
> (/ (+ 5 4 (- 2 (- 3 (+ 6 (/ 4 5))))) (* 3 (- 6 2) (- 2 7)))
-37/150
View gist:193313
SICP Exercise 1.3
(define (square a) (* a a))
(define (sum-of-squares a b) (+ (square a) (square b)))
(define (sum-of-largest-two-squares a b c)
(cond ((and (< a b) (< a c)) (sum-of-squares b c))
((and (< b a) (< b c)) (sum-of-squares a c))
(else (sum-of-squares a b))))
View gist:193316
SICP Exercise 1.4
If b is greater than 0 then add a and b; otherwise subtract b from a.
View example_init_d_script.sh
#!/bin/sh
# Author: Carl Youngblood, 2010
# Based on http://www.novell.com/coolsolutions/feature/15380.html
### BEGIN INIT INFO
# Provides: bluepill
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
View gist:326509
carl@caymbpro:/Library/Python/2.6/site-packages$ bzr
Traceback (most recent call last):
File "/usr/local/bin/bzr", line 141, in ?
bzrlib.trace.enable_default_logging()
File "/Library/Python/2.6/site-packages/bzrlib/trace.py", line 278, in enable_default_logging
term_encoding = osutils.get_terminal_encoding()
File "/Library/Python/2.6/site-packages/bzrlib/lazy_import.py", line 106, in __getattribute__
obj = _replace()
File "/Library/Python/2.6/site-packages/bzrlib/lazy_import.py", line 89, in _replace
obj = factory(self, scope, name)
View gist:326518
carl@caymbpro:/Library/Python/2.6/site-packages$ python -c 'import signal; print signal.SIGWINCH'
Traceback (most recent call last):
File "<string>", line 1, in ?
AttributeError: 'module' object has no attribute 'SIGWINCH'
View brew install -vd ffmpeg
# ./configure --prefix=/usr/local/Cellar/ffmpeg/HEAD --disable-debug --enable-shared --enable-pthreads --enable-nonfree --enable-gpl --enable-libx264 --enable-libfaac --enable-libfaad --enable-libmp3lame
ARCH_EXT_LIST='
altivec
amd3dnow
amd3dnowext
armv5te
armv6
armv6t2
armvfp
iwmmxt
View brew install -vd ffmpeg
# ./configure --prefix=/usr/local/Cellar/ffmpeg/HEAD --disable-debug --enable-shared --enable-pthreads --enable-nonfree --enable-gpl --enable-libx264 --enable-libfaac --enable-libfaad --enable-libmp3lame
ARCH_EXT_LIST='
altivec
amd3dnow
amd3dnowext
armv5te
armv6
armv6t2
armvfp
iwmmxt
View parchment source view
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Parchment</title>
<script src="lib/jquery.min.js" defer></script>
<script src="lib/parchment.min.js" defer></script>
<link rel="stylesheet" type="text/css" href="parchment.css">
<meta name="viewport" content="width=device-width">
</head>
You can’t perform that action at this time.