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 | |
##### | |
# | |
# This script scales an input video to be the duration provided. | |
# | |
# usage: | |
# scale-video.pl [-a audiofile] [-b bitrate] -d hh:mm:ss infile outfile | |
# | |
# The bitrate should be in kbps |
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
CHANNEL="YOURCHANNEL" | |
USER="YOURUSERNAME" | |
PASSWD="YOURPASSWORD" | |
W_RATIO=16 | |
H_RATIO=9 | |
AUDIO="-f mp3 -i http://localhost:8000" | |
ffmpeg \ | |
$AUDIO \ |
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
all: | |
gcc -I. mane.c -o mane -Wall | |
clean: | |
rm mane |
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 bash | |
# Open a connection to canternet | |
exec 3<>/dev/tcp/irc.canternet.org/6667; | |
# Login and join the channel. | |
printf "NICK BashBot\r\n" >&3; | |
printf "USER bashbot 8 * :IRC Bot in Bash\r\n" >&3; | |
sleep 2; | |
printf "JOIN #HackingIsMagic\r\n" >&3; |
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
/* | |
* Bresenhan algorithms from http://free.pages.at/easyfilter/bresenham.html | |
*/ | |
#include <stdio.h> | |
#include <assert.h> | |
#define setPixel(x,y) (A[x][y] = 'X') | |
#define HEIGHT 20 | |
#define WIDTH 80 |
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
diff --git a/src/FocusControl.cc b/src/FocusControl.cc | |
index 5bf113f..bc54311 100644 | |
--- a/src/FocusControl.cc | |
+++ b/src/FocusControl.cc | |
@@ -88,8 +88,10 @@ FocusControl::FocusControl(BScreen &screen): | |
} | |
void FocusControl::cycleFocus(const FocusableList &window_list, | |
- const ClientPattern *pat, bool cycle_reverse) { | |
+ const ClientPattern *pat, bool cycle_reverse, |
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 <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/atomic.h> | |
#include <util/delay.h> | |
#include <stdbool.h> | |
/* | |
* A global flag used to communicate between the Interrupt Service Routine | |
* and the main program. It has to be declared volatile or the compiler | |
* might optimize it out. |
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
/** | |
* A PWM example for the ATmega328P using the 8-Bit Fast PWM mode. | |
*/ | |
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <stdbool.h> | |
#include <util/delay.h> | |
int main (void) { |
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 <avr/io.h> | |
#include <util/delay.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
typedef uint8_t bits_type; | |
#define CFG_SHIFT_DDR DDRB | |
#define CFG_SHIFT_PORT PORTB | |
#define CFG_SHIFT_SRCLK PB1 | |
#define CFG_SHIFT_RCLK PB2 |
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
main = do | |
putStrLn "Enter a number:" | |
n <- getLine | |
putStrLn $ "The factorial of " ++ n ++ " is:" | |
print $ factorial $ read n | |
factorial :: (Num a) => a -> a | |
factorial 0 = 1 | |
factorial n = n * factorial (n - 1) |