Skip to content

Instantly share code, notes, and snippets.

View duksis's full-sized avatar
🇪🇺
I definitely will be slow to respond.

Hugo Duksis duksis

🇪🇺
I definitely will be slow to respond.
View GitHub Profile
@duksis
duksis / keybase.md
Created April 11, 2014 21:51
keybase.io

Keybase proof

I hereby claim:

  • I am duksis on github.
  • I am duksis (https://keybase.io/duksis) on keybase.
  • I have a public key whose fingerprint is 8013 D9C8 8BBF 0346 D8FA 8073 58C1 86B9 7847 F196

To claim this, I am signing this object:

#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'unicorn' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
# bundle exec ruby live_coverage.rb
require 'simplecov'
SimpleCov.start 'rails'
puts 'required simplecov'
require './config/environment'
require 'rails/commands/server'
Rails::Server.start
#!/usr/bin/env ruby
require "optparse"
require "uri"
class PreCiRunner
DEFAULTS = {
:jobs => [:wimdu, :wimdu_js, :wimdu_jasmine, :wimdu_guard_jasmine, :wimdu_checkout]
}
def initialize(attributes = {})
@duksis
duksis / .bash_profile
Created December 13, 2012 13:40
Default CentOS bash_profile and bashrc files
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
@duksis
duksis / log.rb
Created November 26, 2012 16:03 — forked from tmikoss/log.rb
Capistrano recipes for remote log viewing
namespace :log do
desc "Search from log files on server"
task :grep, :roles => :app do
run "cd #{current_path}/log && grep #{ENV['str']} -B #{ENV['before'] || 5} -A #{ENV['after'] || 35} #{rails_env}.log*"
end
desc "Tail log files on servers"
task :tail, :roles => :app do
run "tail -f #{shared_path}/log/#{rails_env}.log" do |channel, stream, data|
puts "#{data}"
@duksis
duksis / perl_urlencode.sh
Created October 15, 2012 07:22
URL encoding in bash
#!/bin/bash
function urlencode() {
echo -n "$1" | perl -MURI::Escape -ne 'print uri_escape($_)'
}
@duksis
duksis / README
Created September 17, 2012 19:25
Wi-Fi Protected Setup vulnerability VU#723755 brute force attack implementation in Python
PoC implementation of a brute force attack against WPS - PIN External Registrar
My test environment was Backtrack 5R1 + an Atheros USB adapter.
I used a mac80211/carl9170 driver but any mac80211-based driver should be ok.
DEPENDENCIES:
PyCrypto
Scapy (2.2.0) (does not come with Backtrack)
USAGE:
@duksis
duksis / cisco_decrypt.c
Created June 28, 2012 11:26
Cisco VPN group password decryptor
/* Decoder for password encoding of Cisco VPN client.
Copyright (C) 2005 Maurice Massar
Thanks to [email protected] for decoding and posting the algorithm!
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@duksis
duksis / geolocation.js
Created May 29, 2012 11:21
Script to get location information from browser
//
// Script for getting location data from browser
//
navigator.geolocation.getCurrentPosition(getLocation, unknownLocation);
function getLocation(pos) {
var latitde = pos.coords.latitude;
var longitude = pos.coords.longitude;
alert('Your current coordinates (latitide,longitude) are : ' + latitde + ', ' + longitude);