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
# because i keep forgetting | |
rm znc.pem | |
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes | |
cat key.pem > znc.pem | |
cat cert.pem >> znc.pem |
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 ruby | |
# encoding: UTF-8 | |
require 'snoo' | |
reddit = Snoo::Client.new :useragent => '/u/flotwig - Responds to "It is known." with "It is known." http://l.t.tl/1q' | |
reddit.log_in 'KhaleesiServantGirl', '' | |
debug = false | |
latest_id = 0 | |
def base10_reddit_id(base36_id) | |
return base36_id.split('_',2).last.to_i(36) | |
end |
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
require 'cinch' | |
require 'open-uri' | |
require 'json' | |
require 'date' | |
class Rando | |
include Cinch::Plugin | |
match /raw (.+)/, method: :do_raw | |
match /refresh/, method: :do_refresh | |
match /index/, method: :do_index_get | |
match /index (.+)/, method: :do_index_set |
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
<?php | |
ini_set('xdebug.max_nesting_level', 10000000000000000000000000000000); | |
$set = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0','@','!','#','$','%','^','&','*','(',')','-',' ','+','-'); | |
$set = array_merge($set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set,$set); | |
$results = array(); | |
gen_nos($set,$results); | |
function gen_nos(&$set, &$results) { | |
for($i=0; $i<count($set); $i++) { | |
$results[] = $set[$i]; | |
$tempset = $set; |
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
function isup($server,$port=80) { | |
if ($port==80||$port==2222||$port==2083) { | |
$up = @file_get_contents('http://' . $server . ':' . $port); | |
if (!$up) { | |
$up = @file_get_contents('http://' . $server . ':' . $port); | |
} | |
} else { | |
$up = @fsockopen($server, $port, $errno, $errstr, 2); | |
if (!$up) { | |
$up = @fsockopen($server, $port, $errno, $errstr, 2); |
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
; <<>> DiG 9.7.3 <<>> -t SRV @ns1.niftyhost.us _minecraft._tcp.seang96.n1fty.com | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28120 | |
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0 | |
;; WARNING: recursion requested but not available | |
;; QUESTION SECTION: | |
;_minecraft._tcp.seang96.n1fty.com. IN SRV |
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
<?php | |
// example usage: | |
// redditApi('user/flotwig'); will return an array with information about me | |
// redditApi('r/breakingbad'); will return an array of info about r/breakingbad | |
function redditApi($call,$domain='www.reddit.com') { | |
$url = 'http://' . $domain . '/' . $call . '.json'; | |
if (function_exists('curl_init')) { // not all PHP installs have cURL | |
$ch = curl_init($url); | |
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE); | |
curl_setopt($ch,CURLOPT_USERAGENT,'/u/flotwig'); // for stats |
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 cv2 | |
import numpy as np | |
import time | |
def filter_image(img, hsv_lower, hsv_upper): | |
img_filt = cv2.medianBlur(img, 11) | |
hsv = cv2.cvtColor(img_filt, cv2.COLOR_BGR2HSV) | |
mask = cv2.inRange(hsv, hsv_lower, hsv_upper) | |
return mask |
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 python3 | |
#!c:/Python35/python3.exe -u | |
import asyncio | |
import sys | |
import cv2 | |
import numpy as np | |
import cozmo | |
import time | |
import os | |
from glob import glob |
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
111now its public |
OlderNewer