Skip to content

Instantly share code, notes, and snippets.

View herculosh's full-sized avatar
💭
I may be slow to respond.

Herculosh C0de herculosh

💭
I may be slow to respond.
View GitHub Profile
@talesa
talesa / pump_dump.py
Last active March 17, 2021 12:32
Short script to for pump and dumps, you have to execute this code line by line so use `jupyter notebook` or `hydrogen` inside `atom` editor
# you have to execute this code line by line so use jupyter notebook or hydrogen inside atom editor
# import libraries
import ccxt
from datetime import datetime
# create exchange API handle
exchange = getattr(ccxt, 'binance')()
# paste in your API key and secret here (if you're afraid they're gonna get stolen, inspect the ccxt library open source code on github)
exchange.apiKey = ''
@oifland
oifland / Jenkinsfile
Last active July 15, 2024 06:36
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@yangkun
yangkun / file_list.groovy
Created April 4, 2013 17:03
[groovy] list dirs/files (dir first and sort as name)
import groovy.io.*
def listfiles(dir) {
dlist = []
flist = []
new File(dir).eachDir {dlist << it.name }
dlist.sort()
new File(dir).eachFile(FileType.FILES, {flist << it.name })
flist.sort()
return (dlist << flist).flatten()