View suit.c
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 <stdlib.h> | |
#include <time.h> | |
void main(){ | |
long long int total = 0; | |
long long int i = 0; | |
for (i = 0; i<1000000; i++){ |
View price.sh
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 | |
# Price-Checker Robot | |
# All dependencies should be pre-installed (at least on Debian): bash, curl, echo, grep, sed, tail, date, bsd-mailx, bc, cut | |
# Alerts user if the price has dropped for defined items. | |
# Reduced items result in alerts to the defined recipient. | |
# Errors are sent to the maintainer | |
# All are logged to $HOME/.price.log |
View darksky_to_php.sh
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 | |
# Note: This is not secure! If you somehow get malicious code back from Darksky.net, this can run arbitrary code. Use wisely and sanitize your inputs! https://www.xkcd.com/327/ | |
output="yourOutputPathHere.php" | |
# Replace with your API key and coordinates. Should be fine with other units and may work without excluding minutel and flags. | |
# I have only teste this format (hourly and daily with SI units). This works for Ottawa, Canada. | |
# Pipes force into separate lines with quoted fields in PHP associative array format: "attribute_name1"=>"value","attribute_name2"=>... | |
# Outputs to a .tmp of your defined file name. | |
curl --compress 'https://api.darksky.net/forecast/<api_key_here>/45.421,-75.69?units=si&exclude=minutely,flags' | tr '{' '\n' | sed 's/},$//' | sed 's/,\ /\ /' | sed -r 's/([^"]),"/\1","/g' | sed -r 's/":([^"])/":"\1/g' | sed -r 's/([^"])\}/\1"\n/' | grep '^"time"' | sed 's/":"/"=>"/g' > $output.tmp |
View lxc-debian-wheezy
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 | |
# | |
# lxc: linux Container library | |
# Authors: | |
# Daniel Lezcano <daniel.lezcano@free.fr> | |
# This library is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU Lesser General Public |
View OCTranspo.pl
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 | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
use Data::Dump qw/ dump /; | |
use JSON::Any; | |
# Define the routes that I actually care about |
View Duolingo.pl
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 | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
use JSON::Any; | |
use HTTP::CookieJar::LWP; | |
my $user = 'username'; |
View mocp-start-cec.pl
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 | |
use strict; | |
use warnings; | |
use JSON::XS; | |
# Checking for devices every time takes a few seconds, so store these | |
# settings in a file. Do so in /tmp so that it will be re-checked on reboot | |
my $tmp = '/tmp/cec-devices'; |
View clone-lxc.pl
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 | |
# Note for GitHub: | |
# This script makes several assumptions based on the backup image I use. | |
# Mine is a freshly installed Debian image preconfigured just how I want it. | |
# The script relies on the name 'fresh-lxc' and IP '10.0.3.1' being set. | |
# It is also written with Debian Buster as the host, some paths may differ. | |
# Make changes appropriately. | |
use strict; |
View wordfind.pl
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 | |
# Program to find all words from a given pool of letters. Written to solve the | |
# Android puzzle game "Wordscape". | |
use strict; | |
use warnings; | |
# Default Debian ispell dictionary | |
my $dict = "/etc/dictionaries-common/words"; |
View cardspace.c
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> | |
void main() { | |
int x,y,z,spaceleft,spaceright,width; | |
printf("|"); | |
for (x=0;x<80;x++) { | |
printf(" "); | |
} | |
printf("|left card right\n"); | |
for (x=1;x<=13;x++) { | |
width = 67 / x; |
OlderNewer