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
tail -f "/dev/null" |
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
const { Resolver } = require('dns'); | |
function domainHasSupportToReceiveEmail(domain) { | |
const resolver = new Resolver(); | |
resolver.setServers(['8.8.8.8']); | |
return new Promise((resolve, reject) => { | |
resolver.resolveMx(domain, (err, address) => { | |
console.log(address) | |
if (err) return reject(err) |
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/bash | |
# Source: https://kobl.one/blog/create-full-ethereum-keypair-and-address/ | |
# Install dependencies | |
sudo apt-get install openssl curl | |
# Download prebuilt sha3 keccak | |
if [ $(uname -m) == 'x86_64' ]; then | |
curl -L -O https://github.com/vkobel/ethereum-generate-wallet/raw/master/lib/x86-64/keccak-256sum | |
else |
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
#Generate random bitcoin address | |
## based from https://gist.github.com/gadiener/ebec8b39b15293fbc438b2d21b211dfe | |
## https://medium.com/coinmonks/how-to-generate-a-bitcoin-address-step-by-step-9d7fcbf1ad0b | |
PRIVATE_KEY="ECDSA" | |
PUBLIC_KEY="ECDSA.pub" | |
BITCOIN_PRIVATE_KEY="bitcoin" | |
BITCOIN_PUBLIC_KEY="bitcoin.pub" |
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
#/home/linx/.local/lib/python3.8/site-packages/bumblebee_status/modules/contrib | |
# pylint: disable=C0111,R0903 | |
import os | |
import re | |
import platform | |
import core.module | |
import core.widget | |
import core.decorators |
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 | |
set -x | |
set -e | |
trap 'catch' ERR | |
catch() { | |
echo "An error has occurred =(" | |
exit 1 | |
} |
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
const formatNumber = (n) => n.toLocaleString('pt-BR', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) |
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
# Get device identification | |
pactl list short sources | |
# To record audio only in mp3 | |
ffmpeg -f pulse -i alsa_input.pci-0000_00_1f.3.analog-stereo -acodec libmp3lame test-audio.mp3 | |
# To record screen | |
# see more in https://wiki.archlinux.org/index.php/FFmpeg#Screen_capture | |
ffmpeg -f x11grab -video_size 1920x1080 -framerate 25 -i $DISPLAY -c:v ffvhuff screen.mkv |
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
// Function rule copied from https://api.jquery.com/serializeArray implementation | |
form = document.querySelector("form") | |
rselectTextarea = /^(?:select|textarea)/i; | |
rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i | |
Array.from(form.elements).filter(function(elem){ | |
return elem.name && !elem.disabled && | |
( elem.checked || rselectTextarea.test( elem.nodeName ) || | |
rinput.test( elem.type ) ); | |
}).reduce((obj, currentValue) => ({...obj, [currentValue.name]:obj[currentValue.name]? [obj[currentValue.name], currentValue.value]: currentValue.value })) |
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
const symbol = Symbol('IS_GEN') | |
const makeGen = (gen) => gen[symbol] = true | |
const isGen = (gen) => Boolean(gen[symbol]) | |
function takeLatest(action, fnGenerator) { | |
makeGen(fnGenerator) | |
return { | |
effect: "takeLatest", | |
action, |
NewerOlder