Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

require 'growl'
module Jekyll
class GrowlPreHook < Hook
safe false
sequence :pre
def run(site)
Growl.notify 'Building...', :title => 'Jekyll'
end
@mpasternacki
mpasternacki / 00-packages_builder.rb
Created May 29, 2012 09:44
Debian packaging continuous integration
# Chef resources describing how to set up package repository server,
# simplified fromactual cookbook (not open sourced yet). Sets up apt
# repository in /srv/apt directory, with system user "apt-repo". Packages
# are GPG-signed to prevent apt-get from complaining on every install.
#
# Directory /srv/apt should be reachable to clients via http or other
# means. This is left as an exercise for the reader.
#
# For extra explanations, see:
# http://joseph.ruscio.org/blog/2010/08/19/setting-up-an-apt-repository/
dmg_package "Alfred" do
volumes_dir "Alfred.app"
source "http://cachefly.alfredapp.com/alfred_1.3.1_261.dmg"
checksum "c951c4dc05ff1091359358d710142cabef2c190be41f799244669f879cff7e80"
action :install
owner WS_USER
end
@cecilemuller
cecilemuller / readme.md
Last active January 29, 2016 15:09
Let's encrypt (Nginx, Ubuntu 14.04 LTS)

Install the client:

apt-get install git
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

Generate certificates using manual mode:

#!/usr/bin/python
"""
Port Knocking with scapy example.
Knock on port 42304
Knock on port 53768
Knock on port 3297
HTTP request to port 19760
Now, to get the flag, we just need to write a small scrip to implement all this logic. We will use the scapy python library to perform the port knocking and curl for the HTTP request part:

Create a Windows OpenStack VM with VirtualBox

0. Obtain Windows ISO

  • Use an existing ISO or copy from a CD with dd if=/dev/cdrom of=image.iso

1. Boot VirtualBox VM from Windows ISO

  • Qcow disk type
  • 40GB Root Disk
  • Load your Windows ISO to the Primary CD drive
  • Add a secondary CD drive and attach the VirtIO ISO to it
@dcode
dcode / ol7_addons.repo.sh
Last active May 18, 2020 20:01
Enable the OL7 Add-ons repo. Includes virtualbox, docker, R, and others.
cat << EOF | sudo tee /etc/yum.repos.d/ol7_addons.repo
[ol7_addons]
name=Oracle Linux $releasever Add ons (\$basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/addons/\$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
EOF
# Verify this manually if you're paranoid like me
@SaitoWu
SaitoWu / gollum.md
Created August 9, 2012 02:46
self host a gollum wiki.

nginx configuration:

user root admin;

worker_processes  1;

# pid of nginx master process
pid /var/run/nginx.pid;
#!/usr/bin/env python
import os
import sys
import platform
import requests
import requests.utils
import certifi
@gilbarbara
gilbarbara / gitsubmodules.sh
Last active October 18, 2022 23:45
Install git submodules from a .gitmodules file
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path