Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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
SCREEN 9 | |
FOR k = 0 TO 640 | |
PSET (k, (k * k) MOD 330) | |
NEXT | |
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
#!/bin/bash | |
# | |
# deliver-maildir -- safely deliver mail to a Maildir. | |
# | |
# For information on the Maildir convention, see | |
# http://en.wikipedia.org/wiki/Maildir | |
# | |
# This program is offered subject to the BSD three-clause license, | |
# see the bottom of this file for details. |
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 hashlib | |
class FeistelSHA1: | |
rounds = 4 # 4 rounds is sufficient as long as the round function is cryptographically secure | |
split = 1 / 2 | |
def __init__(self, key, rounds=rounds): | |
self.subkeys = [hashlib.sha1(bytes((i,)) + key).digest() for i in range(rounds)] |
written in notepad.exe and completely untested - Python has never seen this code :-)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
I use Windows, MINGW64 bash, Python 3.5.2. In an empty directory:
$ virtualenv ENV
[...]
$ source ENV/Scripts/activate
(ENV) $ pip install ablog
[...]
(ENV) $ pip show ablog
Name: ablog
Version: 0.8.4
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
#cloud-config | |
# In order to access RStudio server via the web interface, you must log on with | |
# a user account that allows password access. This script does not add that user | |
# by default. You may either ssh as root into the server and `adduser` as | |
# normal, or script a user addition here: | |
# users: | |
# - name: # username # | |
# lock-passwd: false # allow login with password |
OlderNewer