For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
<?php | |
/** | |
* Function to search for key/value in recursive mode. If last arg is true | |
* it returns it's value or key. By default give true or false if key/value have been found. | |
* | |
* @param array $array Array to search | |
* @param string $search What to search | |
* @param string $mode Mode search for value or key | |
* @param boolean $return Return value or key |
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
# A list of available STUN server. | |
stun.l.google.com:19302 | |
stun1.l.google.com:19302 | |
stun2.l.google.com:19302 | |
stun3.l.google.com:19302 | |
stun4.l.google.com:19302 | |
stun01.sipphone.com | |
stun.ekiga.net |
package main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"strings" | |
) |
<?php | |
/** | |
* Author: Pavel Naumenko | |
*/ | |
namespace frontend\components; | |
use yii\base\ActionEvent; | |
use yii\base\Behavior; | |
use yii\helpers\ArrayHelper; |
This is an example of using module tls
in NodeJS to create a client securely connecting to a TLS server.
It is a modified version from documentation about TLS, in which:
var R = require('ramda'); | |
void 0; //to not bloat the output | |
var random = require('seed-random')(1337); | |
var data = [ | |
{input: [0, 0], output: 0}, | |
{input: [1, 0], output: 1}, | |
{input: [0, 1], output: 1}, | |
{input: [1, 1], output: 0}, | |
]; | |
var activation_sigmoid = x => 1 / (1 + Math.exp(-x)); |
<useragentswitcher> | |
<folder description="Browsers - Windows"> | |
<folder description="Legacy Browsers"> | |
<useragent description="Arora 0.6.0 - (Vista)" useragent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/527 (KHTML, like Gecko, Safari/419.3) Arora/0.6 (Change: )" appcodename="" appname="" appversion="" platform="" vendor="" vendorsub=""/> | |
<useragent description="Avant Browser 1.2" useragent="Avant Browser/1.2.789rel1 (http://www.avantbrowser.com)" appcodename="" appname="" appversion="" platform="" vendor="" vendorsub=""/> | |
<useragent description="Chrome 4.0 (Win 7)" useragent="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.0 Safari/532.5" appcodename="" appname="" appversion="" platform="" vendor="" vendorsub=""/> | |
<useragent description="Chrome 5.0 (Server 2003)" useragent="Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.310.0 Safari/532.9" appcodename="" appname="" appversion= |
# Deployment with zero downtime | |
# By default keeps 2 last deployments in KEEP_DEPLOYMENTS_DIR and current deployment | |
# Project domain | |
PROJECT_NAME=test.com | |
# Project directory | |
PROJECT_DIR=/home/forge/test.com | |
# Deployments directory | |
KEEP_DEPLOYMENTS_DIR=/home/forge/deploy |