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
/** | |
* USB HID Keyboard scan codes as per USB spec 1.11 | |
* plus some additional codes | |
* | |
* Created by MightyPork, 2016 | |
* Public domain | |
* | |
* Adapted from: | |
* https://source.android.com/devices/input/keyboard-devices.html | |
*/ |
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 | |
# by wil92 | |
# remove the noise of an audio | |
# list of needed packages | |
PACKAGES=("sox" "libsox-fmt-ao" "libsox-fmt-mp3" "libsox-fmt-pulse" "libsox-fmt-alsa" "libsox-fmt-base" "libsox-fmt-oss"); | |
# install dependencies if they are not installed already | |
for i in "${PACKAGES[@]}" |
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
n = 20 | |
criba = [] | |
for i in range(n): | |
criba.append(True) | |
def calculate_criba(): | |
criba[0] = criba[1] = False; | |
for i in range(2, n): | |
if criba[i] : |
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
const crypto = require('crypto'); | |
function createHash(text, key) { | |
return crypto.createHmac('sha256', key).update(text).digest('base64'); | |
} | |
function createJwt(payload, key) { | |
const head = Buffer.from(JSON.stringify({alg: "HS256", typ: "JWT"})).toString('base64'); | |
payload = Buffer.from(JSON.stringify({ | |
...(payload || {}), |
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
/* | |
* Author: Felipe Herranz ([email protected]) | |
* Contributors:Francesco Verheye ([email protected]) | |
* Israel Dominguez ([email protected]) | |
*/ | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import android.os.Handler; |