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 ruby | |
# Usage: privacy_preserving_contact_tracing_test.rb [options] | |
# | |
# Specific options: | |
# -K, --tracing-key=TRACING_KEY Tracing key, 32 bytes, HEX encoded | |
# -DDAILY_TRACING_KEY, Daily tracing key, 16 bytes, HEX encoded | |
# --daily-tracing-key When provided TRACING_KEY is ignored | |
# -t, --time=TIME Date and/ or time to use start | |
# -d, --days=NUM_DAYS Number of days to generate identifiers for |
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
/** | |
* build: | |
* gcc feistel_cipher_test.c -o feistel_cipher_test | |
* | |
* run: | |
* ./feistel_cipher_test | |
* | |
* Feistel Cipher test implementation inspired by the "Feistel Cipher - Computerphile" | |
* Youtube video: https://youtu.be/FGhj3CGxl8I | |
* |
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
// Playground by @spllr. Use as you like. | |
import Foundation | |
/// A Game of Tic Tac Toe | |
public struct Game: CustomStringConvertible, Codable | |
{ | |
/// Game Errors | |
/// | |
/// - gameFinished: The game has finished and no plays are possible |
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
/** | |
* Demonstrates how to use Apple's CloudKit server-to-server authentication | |
* | |
* Create private key with: `openssl ecparam -name prime256v1 -genkey -noout -out eckey.pem` | |
* Generate the public key to register at the CloudKit dashboard: `openssl ec -in eckey.pem -pubout` | |
* | |
* @see https://developer.apple.com/library/prerelease/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6 | |
* | |
* @author @spllr | |
*/ |
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
import UIKit | |
import SpriteKit | |
extension String { | |
func hexComponents() -> String?[] { | |
let code = self | |
let offset = code.hasPrefix("#") ? 1 : 0 | |
let start: String.Index = code.startIndex | |
return [ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 ruby -wKU | |
## | |
# Runtime options | |
# | |
require "optparse" | |
options = { :spec => false } | |
ARGV.options do |opts| |
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
module SprocketsInitializer | |
def self.registered(app) | |
require "sprockets" | |
app.controllers :assets do | |
helpers do | |
def sprockets_env | |
return @sprockets_environment if @sprockets_environment | |
@sprockets_environment = Sprockets::Environment.new(Padrino.root) | |
@sprockets_environment.append_path 'app/assets/javascripts' | |
@sprockets_environment.append_path 'app/assets/stylesheets' |
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 ruby | |
# | |
# Usage: | |
# make_story dialog_text_file.txt [output.plist] | |
# | |
# Make sure you install the plist gem: | |
# [sudo] gem install plist | |
# | |
require "parser" |
NewerOlder