npm install --save request
node bitcoin-price.js
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 requests | |
uf = False # Unfollow all (currently followed) users? | |
f = True # Follow all (currently unfollowed) users? | |
def url(path, page=1, auth=""): | |
return "https://api.github.com" + path + "?page=" + str(page) + "&access_token=" + auth | |
def unfollow(user): | |
requests.delete(url("/user/following/" + user["login"], 1, auth)) |
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 sample = [ | |
[ | |
[ | |
[ | |
[ | |
[ | |
{ | |
foo: [{ rate: 2.18 }], | |
}, | |
], |
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var outfile = "primes.txt"; | |
var count = 0; | |
var maxCount = 100; | |
var primes = []; | |
var i = 2; |
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
/** | |
* NeDB With Encryption & Decryption | |
* Last Update 12 Feb 2020 | |
* | |
* @author : Herlangga Sefani Wijaya <https://github.com/gaibz> | |
*/ | |
const path = require('path') // path for database | |
const Datastore = require("nedb") // of course you need NeDB | |
const crypto = require('crypto') // now is in node default module |
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
# ------------------------------------ | |
# Docker alias and function | |
# ------------------------------------ | |
# Get latest container ID | |
alias dl="docker ps -l -q" | |
# Get container process | |
alias dps="docker ps" |
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
/* | |
Hoje não deixaremos mais ninguém no vácuo no whatsapp | |
Para utilizar: | |
- Abra o web.whatsapp.com; | |
- Abra o console e cole o código que está no gist; | |
- Aguarde e verá uma mensagem sendo enviada a cada momento que alguém te enviar alguma mensagem. | |
Confira também como ser chato no whatsapp: https://gist.github.com/mathloureiro/4c74d60f051ed59650cc76d1da0d32da | |
e como ser chato no mensseger: https://gist.github.com/mathloureiro/d3f91d19cf148838217e42a0c6df5ed8 | |
*/ |
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
@echo off | |
REM Make sure that the path to the script is correct! | |
@bash -l -c "~/bin/gitkraken-wsl-bash.sh %*" |
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
# AWS specific install of Docker | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
# exit the SSH session, login again | |
# Docker | |
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq |
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 | |
# Updating Ubunut | |
echo "updating ubunutu... please be patient" | |
apt-get update && apt-get upgrade -y | |
echo "installing required packages... please be patient" | |
apt-get install htop lib32gcc1 -y | |
# Create steam user if needed |
OlderNewer