Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jgrossiord on github.
  • I am grossiord (https://keybase.io/grossiord) on keybase.
  • I have a public key whose fingerprint is EFFC E773 5280 CEBE 2945 2A6C 2E7F 56C5 8016 75E3

To claim this, I am signing this object:

@jgrossiord
jgrossiord / ovhfact.rb
Last active August 29, 2015 14:22 — forked from solisoft/ovhfact.rb
#!/usr/bin/ruby
# Require:
# - linux or Mac
# - ruby 1.8.7
# - Gem soap4r
# - curl
#
# Usage :
# ruby ovhfact.rb 2011
#
@jgrossiord
jgrossiord / gist:0bd525974a5ec059adba
Created June 2, 2015 08:39
Mikrotik script generate address list from DNS cache entries
:foreach i in=[/ip dns cache find] do={
:local bNew "true";
:local cacheName [/ip dns cache all get $i name] ;
# :put $cacheName;
:if (([:find $cacheName "facebook" -1] >= 0) || ([:find $cacheName "outlook" -1] >= 0)) do={
:local tmpAddress [/ip dns cache get $i address] ;
:put $cacheName;
:put $tmpAddress;
stop slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
start slave;
INSERT INTO Table2 (SELECT * FROM Table3 WHERE a=X)
@jgrossiord
jgrossiord / vagrant.sh
Last active December 18, 2015 07:59
Somes vagrant commands
# Startup the VM
vagrant up
# suspend the VM (saved on disk)
vagrant suspend
# shutdown the VM
vagrant halt
# delete the VM
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /vagrant/web
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /vagrant/web/>
AllowOverride All
Order allow,deny
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | grep -v '10.0.2' | grep -v '10.11.12.1' | cut -d: -f2 | awk '{ print "http://"$1"/"}' > /vagrant/logs/web/urls.txt
echo "You can access your application on "
cat /vagrant/logs/web/urls.txt
cd /vagrant
curl -s http://getcomposer.org/installer | php5
php5 composer.phar install
php5 composer.phar update
sudo a2enmod rewrite
sudo a2dissite 000-default
sudo a2ensite silex-app
sudo service apache2 restart