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
<?php | |
/** | |
* Usage on CLI: $ php broadcast.php [telegram-chat-id] [message] | |
*/ | |
require __DIR__ . '/vendor/autoload.php'; | |
use Longman\TelegramBot\Request; | |
use Longman\TelegramBot\Telegram; |
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 -w | |
# | |
# Script for downloading the most recent GPS Assist Data to a Sony DSC | |
# Camera with built-in GPS, such as the Sony DSC-HX5V. The script must | |
# be called with the mount point of a memory card for the camera as | |
# argument. | |
# | |
# See https://github.com/henrikbrixandersen/sony-gps-assist for more | |
# information. | |
# |
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 | |
# make script exit if a simple command fails and | |
# make script print commands being executed | |
set -e -x | |
# names of latest versions of each package | |
export VERSION_PCRE=pcre-8.38 | |
export VERSION_OPENSSL=openssl-1.0.2e | |
export VERSION_NGINX=nginx-1.9.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
Show hidden characters
{ | |
"shell_cmd": "while [ ! -f phpunit.xml.dist ] && [ ! -f phpunit.xml ]; do if [[ `pwd` != '/' ]]; then cd ..; else echo 'No phpunit test config found.'; exit 0; fi; done; phpunit;" | |
} |
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
<?php | |
/** | |
* Problem 10 - https://projecteuler.net/problem=10 | |
* Find the sum of all the primes below two million. | |
*/ | |
function pe10() { | |
// Remember all found primes in this array. | |
$primes = array( 1 => 2 ); | |
$prime_count = 1; |
NewerOlder