Skip to content

Instantly share code, notes, and snippets.

View yahuarkuntur's full-sized avatar
🐈

Brian Debuire yahuarkuntur

🐈
View GitHub Profile
# xset m acceleration threshold
# defaults 2/1 4
xset m 1/4 4
@yahuarkuntur
yahuarkuntur / FOSUBUserProvider.php
Last active November 18, 2016 18:23
My Integration of FosUserBundle and HWIOAuthBundle (symfony 2.7 and hwi/oauth-bundle 0.3.9)
<?php
namespace AppBundle\Services;
use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface;
use HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider as BaseClass;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* https://gist.github.com/danvbe/4476697
@yahuarkuntur
yahuarkuntur / delete_queues
Last active August 29, 2015 14:04
Bash script to delete all RabbitMQ queues from a text file
#!/bin/bash
FILENAME=$@
if [ ! -f $FILENAME ]; then
echo "File $FILENAME not found!"
exit 1
fi
while read line; do
@yahuarkuntur
yahuarkuntur / gist:3980614
Created October 30, 2012 14:44 — forked from ovnicraft/gist:3975271
Validador cedula o ruc
def _check_cedula(self, identificador):
if len(identificador) == 13 and not identificador[10:13] == '001':
return False
else:
if len(identificador) < 10:
return False
coef = [2,1,2,1,2,1,2,1,2]
cedula = identificador[:9]
suma = 0
for c in cedula:
@yahuarkuntur
yahuarkuntur / app.php
Created October 29, 2012 22:25
Silex logout URL
$app['security.firewalls'] = array(
'login' => array(
'pattern' => '^/login$',
'anonymous' => true,
),
'admin' => array(
'pattern' => '^/admin',
'form' => array(
'login_path' => '/login',
'check_path' => '/admin/login_check'),