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
function convertToEnglishNumbers(input) { | |
let o = ''; | |
for (const c of input) { | |
const n = c.codePointAt(0); | |
if (n >= 1632 && n <= 1641) { | |
o += n - 1632; | |
} else if (n >= 1776 && n <= 1785) { | |
o += n - 1776; | |
} else { |
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 { Client } from 'minio'; | |
const maxAllowedSize = 1024 * 1024 * 50; // 50MB | |
const expireTime = 8 * 60 * 60; // 8 hour | |
const minioClient = new Client({ | |
endPoint: S3_ENDPOINT, | |
port: 443, | |
accessKey: S3_ACCESS_KEY, | |
secretKey: S3_SECRET_KEY, |
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
Verifying my Blockstack ID is secured with the address 1MJEB2Aqz1Wh8mMoHgkze4RDusAUWWZAch https://explorer.blockstack.org/address/1MJEB2Aqz1Wh8mMoHgkze4RDusAUWWZAch |
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
# APP settings | |
DATABASE_URL=//user:secret@localhost/db-name | |
# SQITCH settings | |
SQITCH_FULLNAME= | |
SQITCH_EMAIL= |
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
[GENERAL] | |
# Enable or disable the script execution | |
Enabled: True | |
# SYSFS path for checking if the system is running on AC power | |
Sysfs_Power_Path: /sys/class/power_supply/AC*/online | |
## Settings to apply while connected to Battery power | |
[BATTERY] | |
# Update the registers every this many seconds | |
Update_Rate_s: 30 |
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
[commands.swipe.four] | |
up = "qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut Expose" | |
down = "" | |
left = "qdbus org.kde.KWin /KWin nextDesktop" | |
right = "qdbus org.kde.KWin /KWin previousDesktop" |
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
interface FileReader { | |
readAsDataURL(blob: Blob): string; | |
onloadend(): void; | |
result: string; | |
} | |
declare var FileReader: { | |
prototype: FileReader; | |
new (): FileReader; | |
}; |
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
fetch('https://hackerone.com/current_user') | |
.then(res => res.json()) | |
.then(user => { | |
fetch('https://hackerone.com/programs/search?query=type%3Ahackerone&sort=published_at%3Adescending&page=1&limit=1000') | |
.then(res => res.json()) | |
.then(res => res.results) | |
.then(res => res.forEach((r, i) => { | |
setTimeout(() => { | |
var url = `https://hackerone.com${r.url}/policy_subscriptions`; | |
fetch(url) |
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
extern crate filesystem; | |
use std::fs::{self}; | |
use std::io::{Result, Error, ErrorKind}; | |
use std::path::{Path, PathBuf}; | |
use filesystem::{OsFileSystem, FileSystem}; | |
#[derive(Clone, Debug, Default)] | |
pub struct OsSafeFileSystem { | |
fs: OsFileSystem, |
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 twemojiPath = './twemoji/2'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const twemoji = require(`${twemojiPath}/twemoji.npm`); | |
const allCodes = fs.readdirSync(`${twemojiPath}/assets`).map(name => path.basename(name, '.ai')); | |
const gemoji = JSON.parse(fs.readFileSync('gemoji.json')); |
NewerOlder