Skip to content

Instantly share code, notes, and snippets.

View euskadi31's full-sized avatar
🚀
Focusing

Axel Etcheverry euskadi31

🚀
Focusing
View GitHub Profile
#!/bin/bash
# Paste at Pastebin.com using command line (browsers are slow, right?)
# coder : Anil Dewani
# date : Novemeber 7, 2010
#help function
howto()
{
echo "\
Pastebin.com Bash Script \
#!/bin/bash
export STAGE3=20140925
wget https://github.com/euskadi31/gentoo-azure/archive/v1.0.9.tar.gz
tar -zxf v*.tar.gz
cd gentoo-azure-*/
export SCRIPTS=$(pwd)
./provision.sh
--- src/c/src/mt_adaptor.c 2014-10-30 13:40:02.000000000 +0100
+++ src/c/src/mt_adaptor.c 2014-10-30 13:40:58.000000000 +0100
@@ -483,25 +483,9 @@
int32_t fetch_and_add(volatile int32_t* operand, int incr)
{
#ifndef WIN32
- int32_t result;
- asm __volatile__(
- "lock xaddl %0,%1\n"
- : "=r"(result), "=m"(*(int *)operand)
@euskadi31
euskadi31 / .profile
Created May 7, 2015 13:00
My .profile
export EDITOR="vi"
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1) /'
}
parse_git_tag() {
git describe --always --tag 2> /dev/null
}
TRUNCATE RTINDEX rt;
@euskadi31
euskadi31 / uuid.php
Last active August 29, 2015 14:27
PHP UUID v4 class
<?php
/**
* @see http://stackoverflow.com/a/15875555
*/
class UUID
{
public static function random()
{
if (function_exists('uuid_create')) {
@euskadi31
euskadi31 / test.php
Created March 26, 2011 02:28
test exception on basic php function
<?php
echo "Test exception" . PHP_EOL;
echo "Test : explode()";
try
{
$data = '1 2 3 4';
$v = explode('', $data);
echo "\t[ no ]" . PHP_EOL;
}
@euskadi31
euskadi31 / mkv2m4v.sh
Created July 27, 2011 12:34 — forked from dzuelke/mkv2m4v.sh
Convert .mkv video to iPad compatible .m4v without re-encoding
#!/bin/bash
#
# mkv2m4v inputfile.mkv
#
# Given an MKV container with H.264 video & AC3 or DTS audio, converts
# quickly to an iPad-compatible MP4 container without re-encoding the
# video (so it must already be in an iPad-compatible resolution); the
# audio is downmixed to stereo with Dynamic Range Compression.
#
ME=$(basename $0)
<?php
/**
* @package Swift
* @author Axel Etcheverry <axel@etcheverry.biz>
* @copyright Copyright (c) 2011 Axel Etcheverry (http://www.axel-etcheverry.com)
* Displays <a href="http://creativecommons.org/licenses/MIT/deed.fr">MIT</a>
* @license http://creativecommons.org/licenses/MIT/deed.fr MIT
*/
/**
<?php
interface Validator
{
public function isValid($value);
}