Skip to content

Instantly share code, notes, and snippets.

View likewhoa's full-sized avatar

likewhoa likewhoa

View GitHub Profile
@likewhoa
likewhoa / delete-all-messages.js
Last active April 6, 2018 02:52 — forked from IMcPwn/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Click "Copy ID" and paste that instead of LAST_MESSAGE_ID.
// Copy / paste the below script into the JavaScript console.
// If you're in a DM you will receive a 403 error for every message the other user sent (you don't have permission to delete their messages).
var before = '431478432950648842';
clearMessages = function(){
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
@likewhoa
likewhoa / gist:ecfdc548f678f8fa1928789135f6e00d
Last active January 22, 2018 07:07
Crypto Currency List as of 01/15/2018
BTC BitCoin
ETH ethereumproject
XRP Ripple
BCH bitcolncash
ADA cardanostiftung
XEM NEMofficial
LTC litecoin
XLM stellarorg
NEO neo_blockchain
MIOTA iotatoken
@likewhoa
likewhoa / gist:61725382bc1baeb1788bf2946c5d074a
Created February 22, 2017 04:14 — forked from knoguchi/gist:6952087
get financial report from Google Finance
#!/usr/bin/env python
"""
Get financial data from Google Finance.
Requirment:
pyquery 1.2.6. (1.2.1 did not work)
Report types:
inc - income statement
bal - balance sheet
checking for gawk... gawk
checking whether make sets $(MAKE)... ./configure: line 4466: rm: command not found
yes
checking whether make supports nested variables... yes
./configure: line 4607: rm: command not found
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
@likewhoa
likewhoa / howto
Created September 9, 2016 16:44
code that generates a UEFI capable ISO for Gentoo Linux
$ cat mkefiboot
#!/bin/bash
macbootimg() {
python /usr/lib/python3.3/site-packages/livedvd/mkefiboot -a -l "Gentoo Linux" -i gentoo.icns -p "Gentoo Linux" efi/boot macboot.img
}
efiimg() {
local mountdir
mountdir=$(mktemp -d)
To download changes from an old livedvd iso image to a new one without having to redownload the whole image, do the following.
1. emerge zsync
2. zsync -i oldimage.iso http://releases.gentooligans.com/newimage.iso.zsync
@likewhoa
likewhoa / ecatalyst.sh
Created April 27, 2014 01:58
A script that allows you to chroot into a failed catalyst environment to fix errors manually.
#!/bin/bash
# Help menu
print_help() {
cat <<-HELP
Arguments:
--spec - --spec=stage1.spec (default)
--config - --config=/etc/catalyst.conf (default)
@likewhoa
likewhoa / Feed me
Last active August 23, 2017 07:18
Command line how to on setting up feeds and feeds_meetup module for Drupal
1.
# cat site.make
core = 7.x
api = 2
projects[drupal][type] = "core"
projects[drupal][download][type] = git
projects[drupal][download][branch] = 7.x
projects[drupal][download][url] = http://git.drupal.org/project/drupal.git
@likewhoa
likewhoa / BS_test.py
Last active January 2, 2016 11:09 — forked from newbiethetest/tes.py
import Queue
import threading
import urllib2
import time
from BeautifulSoup import BeautifulSoup
hosts = ["http://yahoo.com", "http://google.com", "http://amazon.com",
"http://ibm.com", "http://apple.com"]
queue = Queue.Queue()
import pycurl
import StringIO
import re
def initCurl():
c=pycurl.Curl()
#c.setopt(pycurl.COOKIEFILE,"cookie_file_name")
#c.setopt(pycurl.COOKIEJAR,"cookie_file_name")
c.setopt(pycurl.FOLLOWLOCATION,0)
c.setopt(pycurl.CONNECTTIMEOUT, 1) #
c.setopt(pycurl.MAXREDIRS,1)