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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
* Usage: | |
* Instantiate class $c = couch::i(); | |
* You can now use $c to make calls | |
*/ | |
class couch | |
{ | |
private static $instance = null; | |
private $curl_object = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond $1 !^(index\.php|images|php|script|styles|js|css) | |
RewriteRule ^(.*)$ /index.php/$1 [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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'){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name sonar.dynamis-technologies.com; | |
location / { | |
proxy_pass http://localhost:12356; | |
proxy_set_header Host $host; | |
proxy_buffering off; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
OlderNewer