This file contains hidden or 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 <stdlib.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> | |
int enable = 1; |
This file contains hidden or 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
/* | |
* GccApplication1.c | |
* | |
* Created: 1/23/2020 10:04:20 PM | |
* Author : Kirk | |
*/ | |
#include <avr/io.h> | |
#include <util/delay.h> | |
#include <math.h> |
This file contains hidden or 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 RESULT_TO_STRING( r ) |
This file contains hidden or 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 <stdlib.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#define ME "[server] " | |
void add(int* list, int* size, int val) |
This file contains hidden or 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/bash | |
msg_file=/tmp/$(hexdump -n 16 -e '4/4 "%08X" 1 "\n"' /dev/random).mail | |
echo "subject:ping" > $msg_file | |
echo $1 >> $msg_file | |
sendmail $1 [email protected] < $msg_file | |
rm $msg_file |
This file contains hidden or 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/zsh | |
shell_pid=$PPID | |
last_link=$(readlink -f /proc/$shell_pid/cwd) | |
while true; do | |
link=$(readlink -f /proc/$shell_pid/cwd) | |
if [ $link==$last_link ]; then | |
readlink -f /proc/$PPID/cwd/ > ~/.hole | |
last_link=$link | |
fi |
This file contains hidden or 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
bool set_framerate(int fd) | |
struct v4l2_streamparm parm; | |
parm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | |
// 1/15 seconds per frame. Or 15 frames/second | |
parm.parm.capture.timeperframe.numerator = 1; | |
parm.parm.capture.timeperframe.denominator = 15; |
This file contains hidden or 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
# Name: makefileEDIT | |
# | |
# A simple program for the ATtiny84 that blinks an LED. | |
# | |
# electronut.in | |
DEVICE = attiny84 | |
CLOCK = 8000000 | |
PROGRAMMER = -c avrisp2 | |
OBJECTS = main.o |
This file contains hidden or 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
// build with... | |
// gcc -I/usr/local/include filter.c -lKF -lindicurses -lncurses | |
#include <kf.h> | |
#include <indicurses.h> | |
int main() | |
{ | |
kf_t filter = {}; |
This file contains hidden or 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
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, | |
snap->data, | |
snap->current.width * snap->current.height * 4, | |
NULL); | |
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); | |
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault; | |
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; | |
CGImageRef imageRef = CGImageCreate(snap->current.width, |
NewerOlder