sysctl -a | grep swap
$ sudo pkill -HUP -u _windowserver
Copyright (C) 2012 Yoshimasa Niwa | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(function(){ |
#!/bin/bash | |
# A bash script to create a time machine disk image suitable for | |
# backups with OS X 10.6 (Snow Leopard) | |
# This script probably only works for me, so try it at your own peril! | |
# Use, distribute, and modify as you see fit but leave this header intact. | |
# (R) sunkid - September 5, 2009 | |
# | |
# This will create a time machine ready disk image named with your | |
# computer's name with a maximum size of 600GB and copy it to | |
# /Volumes/backup. The image "file" (it's a directory, really) will |
require 'sinatra' | |
get '/long_process' do | |
child_pid = Process.fork do | |
# hard work is done here... | |
sleep 10 | |
Process.exit | |
end | |
#!/usr/bin/env python3 | |
import sys | |
import re | |
import shutil | |
import argparse | |
import binascii | |
pattern = b'''0a2f54797065202f416e6e6f740a2f53756274797065202f4c696e6b0a2f52656 | |
374205b20.*?205d0a2f426f7264657220.*?\n0a2f41203c3c0a2f54797065202f416374696f6e |
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 network-interface | |
echo | |
echo e.g. $0 eth0 | |
echo | |
echo shows packets-per-second |
#!/usr/bin/env python | |
import pika | |
connection = pika.BlockingConnection(pika.ConnectionParameters( | |
'localhost')) | |
channel = connection.channel() | |
channel.queue_declare(queue='queuename') | |
channel.basic_publish(exchange='', |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
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 |