Skip to content

Instantly share code, notes, and snippets.

View ArondeParon's full-sized avatar
🤓

Aron Rotteveel ArondeParon

🤓
View GitHub Profile
@ArondeParon
ArondeParon / Remote + local jQuery combined
Created February 24, 2011 10:41
Remote + local jQuery inclusion
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="/skin/default/js/libs/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script>
@ArondeParon
ArondeParon / gist:1517283
Created December 24, 2011 12:49
Instant download of every Hacker Monthly issue to date (http://news.ycombinator.org/item?id=3387288)
curl -O "http://s3.amazonaws.com/bearwithclaws.baconfile.com/hackermonthly-issue0[01-19].zip"
@ArondeParon
ArondeParon / gist:2884398
Created June 6, 2012 20:06
Simple one-liner to see if your password is contained in the LinkedIn combo_not.txt fie
echo -n "yourpassword" | shasum | awk {'print $1'} | grep `cat /dev/stdin` combo_not.txt
@ArondeParon
ArondeParon / restore-dns-zones.sh
Created October 16, 2012 17:28
Cpanel DNS zone restoration after 11.34.0 update
#!/bin/bash
for user in /var/cpanel/users/*; do
username=$(basename $user)
if [ -d /backup/cpbackup/daily/$username ]
then
if [ -d /backup/cpbackup/daily/$username/dnszones ]
then
for file in /backup/cpbackup/daily/$username/dnszones/*; do
cp $file /var/named/
done
@ArondeParon
ArondeParon / config.rb
Created March 25, 2013 16:22
Pull and compile SASS
http_path = "/"
css_dir = "../css"
sass_dir = "./"
images_dir = "../images"
javascripts_dir = "../js"
environment = :production
relative_assets = true
output_style = (environment == :production) ? :compressed : :expanded
preferred_syntax = :scss
/**
* Toggle everything!
*
* Options
*
* data-toggle="<selector>" The element that should be toggled.
* data-toggle-class="<classname>" [optional] The classname that should be toggled on the target. If empty, display will be toggled
* data-toggle-alt-html="<content>" [optional] Alternate content that should be displayed in the toggling element
* data-toggle-duration="<duration>" [optional] Duration of the effect. Instant if empty.
* data-save-state="<reference>" [optional] Save the state of the toggle in a a cookie. Requires $.cookie

Keybase proof

I hereby claim:

  • I am arondeparon on github.
  • I am aron (https://keybase.io/aron) on keybase.
  • I have a public key whose fingerprint is C718 84A7 0CC1 0747 C2E0 2D56 45DD 06E1 8A0B E23B

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am arondeparon on github.
  • I am aron (https://keybase.io/aron) on keybase.
  • I have a public key whose fingerprint is 3C3F BE7E 89B8 49E3 A82F 1B2D 121D B30F 3276 E10E

To claim this, I am signing this object:

@ArondeParon
ArondeParon / Vagrantfile
Created March 11, 2016 13:34
Automatically install Ansible requirements when executing Vagrant
# Put this before Vagrant.configure and you're good to go
def install_ansible_requirements
dir = File.dirname(File.expand_path(__FILE__))
if (File.exist?("#{dir}/ansible/requirements.yml"))
system "ansible-galaxy install -r #{dir}/ansible/requirements.yml"
end
end
install_ansible_requirements
@ArondeParon
ArondeParon / BaseModel.php
Last active April 8, 2016 14:36
Laravel casted encrypted attributes
<?php
namespace App\Models;
use Crypt;
use Illuminate\Database\Eloquent\Model;
/**
* This model implements a custom cast named (en)crypt. If a property is added to
* the cast array with this type, the value will be automatically and transparently encrypted