Skip to content

Instantly share code, notes, and snippets.

View shivanshuag's full-sized avatar

Shivanshu Agrawal shivanshuag

View GitHub Profile
@shivanshuag
shivanshuag / 7.x
Created May 9, 2015 17:06
Securesite PHP_codesniffer output
~/webapps/drupal7 ⮀ ⮀ ⮀ drupalcs7 sites/all/modules/securesite ⮂
FILE: .../shivanshu/webapps/drupal7/sites/all/modules/securesite/securesite.info
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
7 | ERROR | It's only necessary to declare files[] if they declare a class or
| | interface.
15 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
owGbwMvMwMT4Z2GMt5n77qOMpw+8TmIIsQt1rVZKyk+pVLKqVkrOyUzNKwGx8hJz
U5WslLJTK5MSi1P1MvMV8vJTUvWyihWganSUylKLijPz84CqDPTM9YyUanVAykGa
0zLz0lOLCooyQWYpJRommlokJiYZGKYaWxokWySmWKYYGBsnpyUnGpommyQZm5mY
JyUlmwKNzMgvLkGxVQlsZnxmClDUzdnR0NTZxAmk3snJGaS+FCxhamiUbGZhbmqe
Zm5ulmZumpiamGJqnmxqZmBmnGpkYABSWJxaBPVScWJ6IsitQJGyzORUJM+mZ5Zk
lCahqc7ILEvMK84oTUwHaSqpLACJlqcmxUP1xydl5qUA/YscIIZAlcklmSADDE0M
jY3NDQ0tTXWUUisKMotS4zNBKkzNzSwMgEBHqaAotUzJKq80JwfkpsK8fKAs0CKg
@shivanshuag
shivanshuag / mfa-auth.pl
Last active August 29, 2015 14:07
OpenVpn Multi Factor Authentication Script
#!/usr/bin/perl
#OpenVpn Multi Factor Authentication Script
#Compares the password to "bar"
use POSIX;
# Get username/password from file
if ($ARG = shift @ARGV) {
if (!open (UPFILE, "<$ARG")) {
print "Could not open username/password file: $ARG\n";
#! /bin/bash
SLEEP_TIME=5 # Default time between checks.
SAFE_PERCENT=30 # Still safe at this level.
DANGER_PERCENT=15 # Warn when battery at this level.
CRITICAL_PERCENT=5 # Hibernate when battery at this level.
NAGBAR_PID=0
export DISPLAY=:0.0
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!