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 | |
mnt=/mnt/codeniko | |
mntWindows=/mnt/windows | |
dev=/dev/sdb1 | |
devWindows=/dev/sda1 # OPTIONAL for useful files on windows partition | |
log=/var/log/codeniko_backup | |
excl=/home/niko/.rsync_backup_exclude.lst | |
incl=/home/niko/.rsync_backup_include.lst |
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/bash | |
# DEPENDENCIES | |
# apt-get install ffmpeg id3v2 | |
# install youtube-dl from github | |
# trim a filepath to only get filename, ${1} is filepath | |
function trimFilename | |
{ | |
last=0 |
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
/* Brightness.c | |
Modify the brightness on laptop running a linux distro. You need root privileges to run as it read/writes to /sys/class/backlight/intel_backlight/brightness. | |
To avoid the password prompt for something as trivial as this, the setuid permission bit wouldn't hurt. | |
Chown root:user and chmod 4750 suggested | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> |
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 <stdlib.h> | |
#include <chrono> | |
#include <iostream> | |
#include <random> | |
#include <string> | |
#include <sstream> | |
#define NUMKEYS 71 | |
static char keys[] = {'a', 'b', 'c' ,'d' ,'e' ,'f' ,'g' ,'h' ,'i' ,'j' ,'k' ,'l' ,'m' ,'n' ,'o' ,'p' ,'q' ,'r' ,'s' ,'t' ,'u' ,'v' ,'w' ,'x' ,'y' ,'z' ,'A' ,'B' ,'C' ,'D' ,'E' ,'F' ,'G' ,'H' ,'I' ,'J' ,'K' ,'L' ,'M' ,'N' ,'O' ,'P' ,'Q' ,'R' ,'S' ,'T' ,'U' ,'V' ,'W' ,'X' ,'Y' ,'Z' ,'0' ,'1' ,'2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'8' ,'9' ,'!' ,'@' ,'#' ,'$' ,'%', '^', '&', '-', '_'}; |
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 <unistd.h> | |
#include <stdlib.h> | |
int main() { | |
setuid(0); | |
system("/sbin/modprobe -r hid_logitech_dj && /sbin/modprobe hid_logitech_dj"); | |
} |
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 <unistd.h> | |
#include <string.h> | |
#include <netdb.h> | |
int conn; | |
char sbuf[512]; | |
void raw(char *fmt, ...) { | |
va_list ap; |
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/bash | |
scriptname='mvfiles.sh' | |
if [ "$#" -ne 1 ]; then | |
/bin/echo "Pass in destination dir as argument" | |
exit 1 | |
else | |
/bin/echo "$(/bin/ls -l | /bin/egrep '^-' | /usr/bin/tr -s ' ' | /usr/bin/cut -d ' ' -f 9-)" | while read line; do if [ "${line}" != "${scriptname}" ]; then /bin/mv "${line}" "${1}"; fi done | |
fi |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script> | |
<script> | |
function getContent() { | |
http.get('content.php', function (res) { | |
var resChunks = ''; | |
res.on('data', function (data) { | |
resChunks += data; |
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/bash | |
kill -9 `ps -ef | grep trans | head -n 1 | xargs | cut -d ' ' -f 2` |
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
var exec = require('child_process').exec; | |
var when = require('when'); | |
function login(credentials) { | |
var whenAuthenticated = when.defer(); | |
var user = credentials.user; | |
var pass = credentials.pass; | |
var res = { |
OlderNewer