Skip to content

Instantly share code, notes, and snippets.

Sergey Karatkevich kevit

Block or report user

Report or block kevit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:525267
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
Debian packaging continuous integration
View 00-packages_builder.rb
# 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/
View alfred.rb
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 Jan 29, 2016
Let's encrypt (Nginx, Ubuntu 14.04 LTS)
View readme.md

Install the client:

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

Generate certificates using manual mode:

View windows-vm-openstack.md

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
@fnichol
fnichol / README.md
Last active Oct 23, 2018
Auto-enable Local HTTP Caching in Test Kitchen
View README.md

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:

Setup

  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)
@dcode
dcode / ol7_addons.repo.sh
Last active Jan 8, 2019
Enable the OL7 Add-ons repo. Includes virtualbox, docker, R, and others.
View ol7_addons.repo.sh
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
@meleyal
meleyal / osx.sh
Last active Feb 7, 2019
OSX defaults, based on http://mths.be/osx
View osx.sh
##
# OSX defaults, based on http://mths.be/osx
#
# Ask for the administrator password upfront
sudo -v
# Set computer name (as done via System Preferences → Sharing)
sudo scutil --set ComputerName "air"
sudo scutil --set HostName "air"
@gilbarbara
gilbarbara / gitsubmodules.sh
Last active Apr 3, 2019
Install git submodules from a .gitmodules file
View gitsubmodules.sh
#!/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
View Port Knocking with Scapy Example
#!/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:
You can’t perform that action at this time.