sysctl -a | grep swap
$ sudo pkill -HUP -u _windowserver
| #!/bin/bash | |
| # script to mount and chroot into a rootfs directory | |
| # designed for openwrt systems, but should work for anything with minimal modifications | |
| # unless you specify a different chroot dir, | |
| # place script on the same level as the rootfs directory, should look something like so: | |
| # /mnt/ | |
| # |- chroot.sh | |
| # |- rootfs/ |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
download.sh file and put it into a directory where you want the files to be saved.cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.| #!/usr/bin/env python3 | |
| import sys | |
| import re | |
| import shutil | |
| import argparse | |
| import binascii | |
| pattern = b'''0a2f54797065202f416e6e6f740a2f53756274797065202f4c696e6b0a2f52656 | |
| 374205b20.*?205d0a2f426f7264657220.*?\n0a2f41203c3c0a2f54797065202f416374696f6e |
| #!/usr/bin/env python | |
| import pika | |
| connection = pika.BlockingConnection(pika.ConnectionParameters( | |
| 'localhost')) | |
| channel = connection.channel() | |
| channel.queue_declare(queue='queuename') | |
| channel.basic_publish(exchange='', |
| Use the -f option to git tag: | |
| -f | |
| --force | |
| Replace an existing tag with the given name (instead of failing) | |
| You probably want to use -f in conjunction with -a to force-create an annotated tag instead of a non-annotated one. | |
| Example |
Changes with .dev domains in
mind.
Create /etc/pf.anchors/dev, containing:
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
| require 'sinatra' | |
| get '/long_process' do | |
| child_pid = Process.fork do | |
| # hard work is done here... | |
| sleep 10 | |
| Process.exit | |
| end | |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
| <?php | |
| $rbls = [ | |
| 'b.barracudacentral.org', | |
| 'cbl.abuseat.org', | |
| 'http.dnsbl.sorbs.net', | |
| 'misc.dnsbl.sorbs.net', | |
| 'socks.dnsbl.sorbs.net', | |
| 'web.dnsbl.sorbs.net', | |
| 'dnsbl-1.uceprotect.net', |