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 math | |
number = 2000 | |
accumulator = [] | |
for a in range(2,number): | |
prime = True | |
for b in range(2,int(math.sqrt(a))): | |
if a % b == 0: | |
prime = False | |
if prime: | |
accumulator.append(a) |
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
<html> | |
<head> | |
<style> | |
.classDate { | |
margin: 0; | |
margin-top: 5px; | |
font-weight: bold; | |
color: #B70000!important; | |
font: Verdana, Helvetica, Arial, sans-serif; | |
} |
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
smtpd_banner = $myhostname ESMTP $mail_name | |
biff = no | |
append_dot_mydomain = no | |
readme_directory = no | |
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem | |
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key | |
smtpd_use_tls=yes | |
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache | |
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache | |
myhostname = cryptomail |
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
#Ripped savagely from https://forum.openwrt.org/viewtopic.php?id=42259 | |
opkg remove ppp* uhttpd luci* kmod-ppp* --force-removal-of-dependent-packages | |
opkg update | |
opkg install kmod-fs-ext4 kmod-usb-storage | |
opkg install block-mount | |
mount /dev/sda1 /mnt | |
mkdir /tmp/root | |
mount -o bind / /tmp/root |
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 sys, difflib, pprint | |
import dns.resolver | |
my_resolver = dns.resolver.Resolver() | |
# 8.8.8.8 is Google's openDNS server | |
my_resolver.nameservers = [sys.argv[2]] | |
import dns.query | |
import dns.zone | |
differ = difflib.Differ() | |
for domain in sys.argv[3:]: |
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 struct, sys, io | |
from hashlib import sha256 | |
from binascii import b2a_hex | |
blkfile = open("blk00000.dat", 'rb') | |
block_hashes = [b'\x00' * 32] | |
trans_hashes = [b'\x00' * 32] | |
def get_var(reader): | |
firstbyte = reader.read(1) | |
if ord(firstbyte) <= 0xfc: |
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
blacklist=vga16fb fb=false video=false vga=normal |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function showTweets(tweets) { | |
var newhtml = ""; | |
for(var a = 0; a < tweets.results.length; a++) { | |
tweet = tweets.results[a]; | |
newhtml += "<img src='" + tweet.profile_image_url +"'>" + tweet.text + "<br>"; | |
} |
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
package main | |
import ( | |
"crypto/md5" | |
"crypto/x509" | |
"encoding/pem" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" |
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 | |
lines = open('/etc/wpa_supplicant/wpa_supplicant.conf').readlines() | |
groups = [[]] | |
for line in lines: | |
if line[0] != '#': | |
line = '#' + line | |
groups[-1] += [ line ] | |
if '}' in line: | |
groups += [[]] | |
groups += [[]] |