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
// 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(); |
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
BTC BitCoin | |
ETH ethereumproject | |
XRP Ripple | |
BCH bitcolncash | |
ADA cardanostiftung | |
XEM NEMofficial | |
LTC litecoin | |
XLM stellarorg | |
NEO neo_blockchain | |
MIOTA iotatoken |
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 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 |
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
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 |
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
$ 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) |
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
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 | |
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 | |
# Help menu | |
print_help() { | |
cat <<-HELP | |
Arguments: | |
--spec - --spec=stage1.spec (default) | |
--config - --config=/etc/catalyst.conf (default) |
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
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 |
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 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() |
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 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) |
NewerOlder