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 | |
| # The IP for the server you wish to ping (8.8.8.8 is a public Google DNS server) | |
| SERVER=8.8.8.8 | |
| # Only send two pings, sending output to /dev/null | |
| ping -c2 ${SERVER} > /dev/null | |
| # If the return code from ping ($?) is not 0 (meaning there was an error) | |
| if [ $? != 0 ] |
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
| #!/usr/bin/env perl | |
| package CurlEasy; | |
| use strict; | |
| use utf8; | |
| use Moo; | |
| use Net::Curl::Easy qw(/^CURLOPT_/); | |
| extends 'AnyEvent::Net::Curl::Queued::Easy'; |
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
| 1000 北海 | |
| 1008 社会 | |
| 1053 海道 | |
| 1110 現在 | |
| 1117 場合 | |
| 1123 利用 | |
| 1124 体人 | |
| 1125 世界 | |
| 1135 大学 | |
| 1144 都市 |
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/sh | |
| SEP= | |
| SEPE= | |
| CLOCK=⌚ | |
| CALENDAR=☼ | |
| MUSIC=♫ | |
| WIDTH=${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
| use strict; | |
| use warnings; | |
| die "Malfunction. Need input." unless $ARGV[0]; | |
| open(W, "/usr/share/dict/words"); | |
| my @w; | |
| while (my $line = <W>) { | |
| chomp($line); | |
| push(@w, lc($line)); |
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
| #!/usr/bin/perl | |
| use Mysql; | |
| use strict; | |
| use vars qw($school_name); | |
| use vars qw($pass); | |
| require "./cgi-lib.pl"; |
- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
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 | |
| function usage() { | |
| echo 'Usage: wtf-did-i-do {options}' | |
| echo | |
| echo 'OPTIONS:' | |
| echo " -a author/committer; '' is allowed (defaults to $USER)" | |
| echo ' -s since such date (defaults to 7.days.ago)' | |
| echo ' -u until such date (defaults to today)' | |
| echo ' -m directories max depth recurse (defaults to 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
| // Goertzel Demodulator | |
| // | |
| // This program demodulates two tone FSK using the goertzel algorithm. | |
| #include <stdio.h> | |
| #include <math.h> | |
| struct gConstants { | |
| float f1norm; | |
| float f2norm; |