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
Q. Why do computer scientists always confuse Christmas and Halloween? | |
A. Because Oct 31 == Dec 25 | |
(Oct is octal, or base 8; Dec is decimal, or base 10. The octal representation | |
of the decimal number 25 is 31.) |
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
# PowerShell command to delete editor (Emacs, Vim, etc.) tilde backup files | |
# from any directories passed to it either as a parameter or through the | |
# pipeline. | |
function Remove-EditorBackups() { | |
param([string[]]$Paths, [switch]$Recurse, [switch]$Force, [switch]$Verbose) | |
begin { | |
$script:foundInput = $false | |
function delete($fileinfo) { |
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
#!/usr/bin/perl | |
# mt-export-markdown.pl: Process Movable Type export files | |
# containing Markdown posts into pure HTML. | |
# | |
# Mark Shroyer | |
# Mon Oct 11 01:37:52 EDT 2010 | |
use warnings; | |
use strict; |
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 Graphics.UI.Gtk | |
main :: IO () | |
main = do | |
initGUI | |
window <- windowNew | |
label <- labelNew $ Just "Hello, world from gtk2hs!" | |
set window [ containerBorderWidth := 20, | |
containerChild := label ] | |
onDestroy window mainQuit |
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
(define (p i c x) | |
(cond ((< i 1) "*") | |
((> (magnitude x) 2) " ") | |
(else (p (- i 1) c (+ (* x x) c))))) | |
(do ((y -1 (+ y .05))) ((> y 1)) | |
(do ((x -2 (+ x .025))) ((> x 1)) | |
(let ((c (make-rectangular x y))) | |
(display (p 99 c c)))) | |
(newline)) |
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
include $(TOPDIR)/rules.mk | |
PKG_NAME:=tcpdump | |
PKG_VERSION:=4.1.1 | |
PKG_RELEASE:=1 | |
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |
PKG_SOURCE_URL:=http://www.tcpdump.org/release/ | |
PKG_MD5SUM:=d0dd58bbd6cd36795e05c6f1f74420b0 |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: firewall | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: iptables firewall | |
# Description: Custom iptables firewall |
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
#!/usr/bin/env python | |
class Room: | |
def __init__(self, name): | |
self.name = name | |
if __name__ == '__main__': | |
r = Room('FooRoom') | |
r.shortdesc = "Some short description" | |
r.longdesc = "And some slightly longer description" |
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
=== FILE: test2.scm ======================================================= | |
#> | |
#include <stdint.h> | |
uint32_t foreign_proc() | |
{ | |
return UINT32_MAX; | |
} |
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
#include <stdio.h> | |
#include <stdbool.h> | |
int main(int argc, char *argv[]) | |
{ | |
bool b; | |
*((unsigned char *)&b) = 0xff; | |
if ( b ) | |
printf("b is true\n"); |
OlderNewer