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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
) | |
const SESSIONS = 1_000_000 | |
func main() { |
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
{ | |
"detail": { | |
"attributes": { | |
"hideResponseInput": true, | |
"img": "static/img/FIDO-U2F-Security-Key-444x444.png", | |
"webAuthnSignRequest": { | |
"allowCredentials": [ | |
{ | |
"id": "nPr77L4_***", | |
"transports": [ |
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
import binascii | |
import sys | |
import typing | |
from cryptography.hazmat.primitives import ciphers, hashes, hmac, padding | |
from cryptography.hazmat.primitives.ciphers import algorithms | |
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC | |
def vault_parse(lines: typing.List[str]) -> typing.Tuple[bytes, bytes, bytes]: |
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
package permute | |
func fact(n int) int { | |
result := 1 | |
for i := 1; i <= n; i++ { | |
result *= i | |
} | |
return result | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.facade, .player { | |
margin: 0 auto; | |
display: block; | |
} | |
.facade { | |
position: relative; |
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
def modify_luminance(colour, lum=0): | |
rgb = 0 | |
for i in range(0, len(colour), 2): | |
component = int(colour[i : i + 2], 16) | |
modified = round(min(max(0, component + (component * lum)), 255)) | |
rgb = rgb * 256 + modified | |
return f"{rgb:0>6X}" |
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 python3 | |
# | |
# talideon-wallpaper | |
# by Keith Gaughan <http://talideon.com/> | |
# | |
# A pipemenu script for Openbox for selecting and setting the current | |
# wallpaper. | |
# | |
# Copyright (c) Keith Gaughan, 2008. | |
# All Rights Reserved. |
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 -e | |
while getopts hc:w:t: name; do | |
case $name in | |
c) | |
config_dir="$OPTARG" | |
;; | |
w) | |
challenge_dir="$OPTARG" | |
;; |
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
package iteration | |
func fiboChan(n int) <-chan int { | |
c := make(chan int) | |
go func() { | |
a := 0 | |
b := 1 | |
for i := 0; i < n; i++ { | |
a, b = b, a+b |
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
For want of a nail the shoe was lost. | |
For want of a shoe the horse was lost. | |
For want of a horse the rider was lost. | |
For want of a rider the message was lost. | |
For want of a message the battle was lost. | |
For want of a battle the kingdom was lost. | |
And all for the want of a horseshoe nail. |
NewerOlder