#Using https
git remote add otheruser https://github.com/otheruser/yourrepo.git
# Or - Using SSH
git remote add otheruser [email protected]:otheruser/yourrepo.git
git fetch otheruser
#!/bin/sh | |
# install beadm and create new boot environment hbsd and mount it at /mnt | |
pkg install -y beadm | |
beadm create hbsd | |
beadm mount hbsd /mnt | |
# fetch latest HBSD base and kernel - will be hbsd-update'd later | |
cd /tmp | |
fetch https://installer.hardenedbsd.org/pub/HardenedBSD/releases/amd64/amd64/hardenedbsd-12-stable-LAST/base.txz | |
fetch https://installer.hardenedbsd.org/pub/HardenedBSD/releases/amd64/amd64/hardenedbsd-12-stable-LAST/kernel.txz |
#Using https
git remote add otheruser https://github.com/otheruser/yourrepo.git
# Or - Using SSH
git remote add otheruser [email protected]:otheruser/yourrepo.git
git fetch otheruser
When developing a program in Ruby, you may sometimes encounter a memory leak. For a while now, Ruby has a facility to gather information about what objects are laying around: ObjectSpace.
There are several approaches one can take to debug a leak. This discusses a time-based approach, where a full memory dump is generated every, say, 5 minutes, during a time that the memory leak is showing up. Afterwards, one can look at all the objects, and find out which ones are staying around, causing the
#!/bin/bash | |
# | |
# Script to update template images in a big batch | |
# | |
# Get a list of templates | |
TEMPLATES=$(qvm-ls | grep Tpl | awk {'print $1'} |cut -d[ -f2 | cut -d] -f1) | |
usage() | |
{ |
WPScan Public Source License | |
The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2015 WPScan Team. | |
Cases that include commercialization of WPScan require a commercial, non-free license. Otherwise, WPScan can be used without charge under the terms set out below. | |
Definitions | |
“License” means this document. | |
“Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns WPScan. |
server { | |
listen 80; | |
<% if @use_ssl %> | |
listen 443 ssl spdy; | |
ssl_certificate ssl/<%= @domain %>/server.crt; | |
ssl_certificate_key ssl/<%= @domain %>/server.key; | |
<% end %> | |
server_name <%= @domain %><% if @also_www %> www.<%= @domain %><% end %>; | |
access_log /var/log/nginx/access.log main; |
Every time I have to setup a new environment, I completely forget the mess you have to go through in order to get your kernel debug world setup properly. So this is here to make sure I won't forget it ever again.
I do not run linux as a desktop, and I suggest that nobody else does. My development consists of OS-X, and VirtualBox with two (almost) identical installations of linux (whatever you want, but I use ubuntu here in my examples). Our secondary VM will be the host which we will be debugging, as in our primary box will attach to it via kgdb.
Clone your VM - no need to do a full history copy, just a snapshot clone, call it something that won't confuse you later, like "fucktard69" if your main VM is "shitcocks666". It doesn't matter, shut the fuck up.
require 'rufus/scheduler' | |
class Scheduler | |
# Starts the scheduler unless it is already running | |
def self.start_unless_running(pid_file) | |
with_lockfile(File.join(File.dirname(pid_file), 'scheduler.lock')) do | |
if File.exists?(pid_file) | |
pid = IO.read(pid_file).to_i | |
if pid > 0 && process_running?(pid) | |
puts "not starting scheduler because it already is running with pid #{pid}" |
require "money" | |
class Decorator < BasicObject | |
undef_method :== | |
def initialize(component) | |
@component = component | |
end | |
def method_missing(name, *args, &block) |
# run with: god -c /path/to/config.god [add -D if you want to not-deamonize god] | |
# This is the actual config file used to keep the delayed_job running | |
APPLICATION_ROOT = "/var/www/application" | |
RAILS_ENV = "production" | |
God.watch do |w| | |
w.name = "delayed_job_production" | |
w.interval = 15.seconds | |
w.start = "/bin/bash -c 'cd #{APPLICATION_ROOT}/current; /usr/bin/env RAILS_ENV=#{RAILS_ENV} #{APPLICATION_ROOT}/current/script/delayed_job start > /tmp/delay_job.out'" |