Skip to content

Instantly share code, notes, and snippets.

@s0kil
s0kil / concurrent_port_scanner.hs
Created April 18, 2022 09:50 — forked from xandkar/concurrent_port_scanner.hs
Concurrent port scanner in Haskell
-- http://blog.moertel.com/articles/2004/03/13/concurrent-port-scanner-in-haskell
module Main (main) where
import Control.Concurrent
import Control.Exception
import Data.Maybe
import Network
import Network.BSD
import System.Environment
@s0kil
s0kil / .stylish-haskell.yaml
Created March 16, 2022 16:43
.stylish-haskell.yaml
# stylish-haskell configuration file
# ==================================
# The stylish-haskell tool is mainly configured by specifying steps. These steps
# are a list, so they have an order, and one specific step may appear more than
# once (if needed). Each file is processed by these steps in the given order.
steps:
# Convert some ASCII sequences to their Unicode equivalents. This is disabled
# by default.
# - unicode_syntax:
@s0kil
s0kil / gist:98e7487557537581b485b1d64ae13950
Created March 4, 2022 12:11
Linux split csv file into multiple and keep header
cat Large-File.csv | parallel --header : --pipe -N2000 'cat >file_{#}.csv'
@s0kil
s0kil / antminer-clock-error.txt
Created December 3, 2021 04:19
Antminer Clock Error
driver/uart.c:49:set_baud: set UART baud to 3000000
driver/driver-btm-api.c:821:check_clock_counter: freq 50 clock_counter_limit 6
driver/register.c:699:quick_dump_core_hash_clock_counter: bad clock counter. chain = 1, asic = 7, core = 0, found 0, clock counter 0x00000000
Assert fail!! driver/driver-btm-api.c:927: clock count check failed, retry.
@s0kil
s0kil / gist:037d90a9bc791a104ad8e4be71da7cc2
Created September 23, 2021 13:03
Install snapd Chromos Linux
sudo apt install libsquashfuse0 squashfuse fuse
sudo apt install snapd
@s0kil
s0kil / ASIC-Miner-AliExpress-Scams.md
Created July 28, 2021 20:11
ASIC Miner AliExpress Scams

ASIC Miner AliExpress Scams

@s0kil
s0kil / as-html.js
Created July 6, 2021 17:30
Get Miner Names From ASIC Miner Value
[...document.querySelectorAll("#datatable_profitability > tbody > tr > td:nth-child(1) > div > div:nth-child(2) > a > span:nth-child(2)")].reduce((all, item) => {
let a = `<li><a href='${item.parentNode.href}'>${item.textContent}</a></li>`
return `${all}${a}`
}, "")
@s0kil
s0kil / docker-cleanup.sh
Created June 30, 2021 18:19
Docker Cleanup
# Kill All Containers
sudo docker kill $(sudo docker ps -q)
# Prune Containers, Images, Volumes, Cache
sudo docker system prune --all