Skip to content

Instantly share code, notes, and snippets.

@3l3n01
3l3n01 / couch.php
Created November 20, 2012 00:06 — forked from timbuchwaldt/couch.php
Minimal PHP CouchDB Layer
<?
/*
* Usage:
* Instantiate class $c = couch::i();
* You can now use $c to make calls
*/
class couch
{
private static $instance = null;
private $curl_object = null;
@3l3n01
3l3n01 / UUID.php
Created November 20, 2012 00:26 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4211 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@3l3n01
3l3n01 / .htaccess
Created February 2, 2013 07:36 — forked from yesidays/.htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|images|php|script|styles|js|css)
RewriteRule ^(.*)$ /index.php/$1 [L]
//function to define a class
// actual version is a rewrite by anieto2k: http://www.anieto2k.com
//params:
// @current : Object with the methods and attributes of the class
// @previous : Class from witch we wante to extend (optional)
JotaClass = function(current,previous){
previous = typeof previous == 'undefined' ? {} : previous.prototype;
for(p in previous){
if(typeof current[p] == 'undefined') current[p] = previous[p];
else if(typeof previous[p] == 'function'){
@3l3n01
3l3n01 / setup_selenium.sh
Created November 5, 2015 20:07 — forked from curtismcmullan/setup_selenium.sh
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@3l3n01
3l3n01 / angularjs-providers-explained.md
Created January 25, 2017 19:08 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@3l3n01
3l3n01 / sonar.conf
Created May 24, 2017 05:03 — forked from cescoffier/sonar.conf
nginx server proxy for Sonar
server {
server_name sonar.dynamis-technologies.com;
location / {
proxy_pass http://localhost:12356;
proxy_set_header Host $host;
proxy_buffering off;
}
}
@3l3n01
3l3n01 / gox.text
Created May 31, 2017 05:34 — forked from achun/gox.text
go get golang.org/x
go get -u golang.org/x/crypto/bcrypt
go get -u golang.org/x/crypto/blowfish
go get -u golang.org/x/crypto/bn256
go get -u golang.org/x/crypto/cast5
go get -u golang.org/x/crypto/curve25519
go get -u golang.org/x/crypto/hkdf
go get -u golang.org/x/crypto/md4
go get -u golang.org/x/crypto/nacl/box
go get -u golang.org/x/crypto/nacl/secretbox
go get -u golang.org/x/crypto/ocsp
<source>
type tail
path /var/log/containers/*.log
pos_file /var/log/containers.log.pos
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag kubernetes.*
format json
read_from_head true
</source>
@3l3n01
3l3n01 / pm_install.sh
Created April 23, 2018 07:20 — forked from punkdata/pm_install.sh
Postman Install Ubuntu 17.10
#!/usr/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
#Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Postman