Copyright (c) 2024 Leonardo Faoro
Preamble
This license permits the use, modification, and distribution of the software for non-commercial purposes, safeguarding commercial use and ensuring attribution.
#!/usr/bin/env bash | |
set -euo pipefail | |
usage() { | |
echo "Usage: $0 <data> <difficulty>" | |
echo "Example: $0 \"$(date -u +%N)\" 3" | |
echo | |
echo "Parameters:" | |
echo " data - Input data to hash (typically a timestamp)" | |
echo " difficulty - Number of leading zeros required in hash" |
package main | |
import ( | |
"bufio" | |
"log" | |
"os" | |
"sort" | |
"strconv" | |
"strings" | |
) |
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* | |
* BEWARE: | |
* This file uses the Option key as a meta key. This has the side-effect | |
* of overriding Mac OS keybindings for the option key, which generally |
// CreditCardRegex is the pattern used to identify a credit card PAN. | |
var CreditCardRegex = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$" | |
var rxCreditCard = regexp.MustCompile(CreditCardRegex) | |
var rxNotNumber = regexp.MustCompile("[^0-9]+") | |
// IsCreditCard checks if the string is a credit card. | |
func IsCreditCard(s string) bool { | |
sanitized := rxNotNumber.ReplaceAllString(s, "") | |
if !rxCreditCard.MatchString(sanitized) { | |
return false |
apiVersion: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
name: batch-sql-backup | |
spec: | |
schedule: "* */60 * * *" | |
concurrencyPolicy: Forbid | |
jobTemplate: | |
spec: | |
template: |
#!/usr/bin/env bash | |
BASE=(`cat VERSION | tr '.' ' '`) | |
MAJOR=${BASE[0]} | |
MINOR=${BASE[1]} | |
PATCH=${BASE[2]} | |
case $1 in | |
"major") | |
let "MAJOR++" |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BuildMachineOSBuild</key> | |
<string>15E55</string> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>AppleIntelHD5000Graphics</string> |
141.101.98.117 - - [11/Jan/2016:21:39:57 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:58 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:58 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:58 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:58 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:58 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:58 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:59 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:59 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" | |
141.101.98.117 - - [11/Jan/2016:21:39:59 +0100] "GET / HTTP/1.1" 303 317 "-" "curl/7.35.0" |
<?php | |
/** | |
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or | |
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below). | |
* | |
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/ | |
* | |
* INSTRUCTIONS: | |
* 1. Edit the variables below | |
* 2. Upload this script to your server somewhere it can be publicly accessed |