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 | |
# usage: $0 00030050204050205040520370782340520508485019857294857049587 | |
use integer; | |
@A = split //, <>; | |
sub R { | |
return if grep { # if this solution is invalid, bail | |
($_ / 9 == $i / 9 # find pairs of boxes to compare |
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
echo "FD & mnh | |
FD & minamhere | |
fd & MNH | |
Fd & MNH | |
fulld & mnh | |
fulld & minamhere | |
fulldecent & mnh | |
fulldecent & minamhere | |
fd MNH | |
fulld MNH |
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
tell application "Reminders" | |
set todo_accounts to every account | |
-- accounts have lists. loop thru accounts to get their lists. | |
repeat with i from 1 to length of todo_accounts | |
tell account i | |
set todo_lists to get every list | |
-- lists have reminders. loop thru lists to get their reminders | |
repeat with j from 1 to length of todo_lists | |
tell list j | |
set todos to (get reminders) |
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
<?php | |
// Service account code from http://stackoverflow.com/questions/18258593/using-a-service-account-getaccesstoken-is-returning-null | |
// Analytics code from https://code.google.com/p/google-api-php-client/source/browse/trunk/examples/analytics/simple.php?r=474 | |
require_once 'google-api-php-client/src/Google_Client.php'; | |
require_once 'google-api-php-client/src/contrib/Google_AnalyticsService.php'; | |
// Set your client id, service account name (AKA "EMAIL ADDRESS"), and the path to your private key. | |
// For more information about obtaining these keys, visit: | |
// https://developers.google.com/console/help/#service_accounts |
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
<?php | |
$title = "Knowledge Base 0.1"; | |
$datadir = './data/'; | |
if (!is_dir($datadir) || !is_writable($datadir)) die('The DATADIR directory must be writable'); | |
$myurl='http://phor.net/PUB/chris/index'; | |
?> | |
<html> | |
<head> | |
<title><?= $title ?></title> |
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
<!-- COPIED FROM https://phor.net/gadgets/fen2html/ --> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
<title>FEN2HTML</title> | |
<style> | |
table.chess { border: 1px solid black; margin: 2px; font-size: xx-large} |
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
## | |
## backup-to-insecure-remote-server v1.0 | |
## William Entriken / [email protected] | |
## | |
## YOU NEED TO KEEP A BACKUP OF .encfs6.xml AND YOUR PASSKEY!!! | |
## | |
## TODO | |
## * Create a restore action | |
## * Make a quick task to confirm that restoring works | |
## |
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
# THIS IS A RAKEFILE | |
# NOTE: See .encfs6.xml file in this directory! | |
plaintext_dir = "/Volumes/FD Disk/" | |
filtered_dir = "/Volumes/FD Disk/FILTERED NOSYNC/" | |
ciphertext_dir = "/tmp/fd-disk-encrypted/" | |
backup_location = "[email protected]:/root/fd-disk-encrypted/" | |
backup_location_tmp = "[email protected]:/root/fd-disk-encrypted-tmpdelete/" | |
photo_dir = "/Volumes/FD Disk/media/my photos/" |
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 <string.h> | |
typedef struct node { | |
int value; | |
struct node *left; | |
struct node *right; | |
} node; |
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
// See https://math.stackexchange.com/questions/835031/how-many-ways-to-pick-x-balls | |
double choose_n_balls(int n, int num_types, int *count_per_type) | |
{ | |
int total_count = 0; | |
for (int i = 0; i < num_types; i++) { | |
total_count += count_per_type[i]; | |
} | |
if (n > total_count) | |
return 0; |
OlderNewer