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
(defun my-setup-header-line-format () | |
"Hide header line if required." | |
(set-window-parameter (next-window) 'header-line-format | |
(unless (window-at-side-p (next-window) 'top) | |
'none))) | |
(add-hook 'exwm-update-class-hook #'my-setup-header-line-format) | |
(set-face-attribute 'header-line nil | |
:background "#000000" |
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
/* | |
Improves the security of https://www.draketo.de/english/secure-passwords: | |
- Replace the letters with the original proposal at https://www.draketo.de/software/letterblock-diceware | |
- All bigrams are kept, rather than truncating | |
- Replace Math.random() with crypto.getRandomValues() | |
- Replace Math.floor(Math.random() * length) with uniform modulo rejection | |
- Replace a character count with a minimum security margin | |
- The HTML "Length" input should be replaced with "Security minimum" (or something similar, in bits) | |
- Implement the checksum per https://www.draketo.de/software/letterblock-diceware | |
- Use 6 characters instead of 4 (or 7) for a uniform checksum |
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
// use by adding | |
// apply from:'jdee.gradle' | |
// to build.gradle | |
def prj = { project -> | |
"(jdee-project-file-version" (["1.0"]) | |
"(jdee-set-variables" { | |
"'(jdee-compile-option-directory" ([project.sourceSets.main.output.classesDir]) | |
"'(jdee-junit-working-directory" ([project.projectDir]) |
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 java.math.BigInteger; | |
class Factors { | |
public static void main (String [] args) | |
{ | |
// 157 bit n = pq with p ~= 78 bits | |
BigInteger n = new BigInteger("273966616513101251352941655302036077733021013991"); | |
// Set i to be p - 10e6 | |
BigInteger i = new BigInteger("496968652506233112158689"); |
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
;; 素のFlymakeでAntを使うとエラー吐くので,いくつか関数を書き換える必要があるっぽい. | |
(require 'flymake) | |
(setq flymake-allowed-file-name-masks | |
'(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init) | |
("\\.xml\\'" flymake-xml-init) | |
("\\.html?\\'" flymake-xml-init) | |
("\\.cs\\'" flymake-simple-make-init) | |
("\\.p[ml]\\'" flymake-perl-init) |
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
*.so | |
*.o | |
*.html | |
.*.un~ | |
.*.swp |
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
8fb2e1d19eba11e40ffaa70425f1585aeef48fe5 0 iJwEAAEIAAYFAlUPNnMACgkQ3M8NswvBBUixLAP/dujl7lJDpdoR97e52NCmANPaNb3cXCVwoZ96RXyFKXMj4sFp/cN321AoVBcThfHTco2NV02rTRQD9ZzrWIlTC412qezijC8hqBle9w9G1w5JWCIaLUX18vz/MECLj5Y/UQU7mvh8Dd7okfJxvDIYKzw1A6IQxd9hB31SS1xgbbA= |
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 | |
# This script uses x264 and ffmpeg to recode an input video to low-bitrate MPEG-TS segmented h264 | |
# stream that is suitable for streaming over the web and can be inserted into Freenet. | |
# Settings have been chosen to strongly prefer quality over encoding speed under conditions of an | |
# extremely low bitrate, to make the result suitable for direct streaming over Freenet. | |
# | |
# (c) bertm, 2014 | |
# | |
# Prefix for file names in the playlist |