- Install pre-requisities
sudo apt-get install build-essential tcl
- Install Redis
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
sudo apt-get install build-essential tcl
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
| package main | |
| import ( | |
| "github.com/go-redis/redis" | |
| "fmt" | |
| "time" | |
| ) | |
| func ExampleNewClient() { | |
| client := redis.NewClient(&redis.Options{ |
| extern crate num; | |
| use num::bigint::BigInt; | |
| fn main() { | |
| match "123123123123123123123".parse::<BigInt>() { | |
| Ok(n) => println!("{}", n), | |
| Err(_) => println!("Error") | |
| } | |
| // For Masud | |
| use std::env; | |
| fn main() { | |
| let args: Vec<String> = env::args().collect(); | |
| match args.len() { | |
| 2 => { |
| import pip | |
| installed_packages = pip.get_installed_distributions() | |
| installed_packages_list = sorted(["%s==%s" % (i.key, i.version) | |
| for i in installed_packages]) | |
| print(installed_packages_list) | |
| will print | |
| [ | |
| 'alembic==0.9.6', 'asn1crypto==0.22.0', 'beautifulsoup4==4.5.3', 'bleach==2.0.0', |
| import socket | |
| import struct | |
| def make_ip(proto, srcip, dstip, ident=54321): | |
| saddr = socket.inet_aton(srcip) | |
| daddr = socket.inet_aton(dstip) | |
| ihl_ver = (4 << 4) | 5 | |
| return struct.pack('!BBHHHBBH4s4s' , ihl_ver, 0, 0, ident, 0, 255, proto, 0, saddr, daddr) | |
| def make_tcp(srcport, dstport, payload, seq=123, ackseq=0, fin=False, syn=True, rst=False, psh=False, ack=False, urg=False, window=5840): |
| global | |
| log 127.0.0.1 local0 | |
| user root | |
| group root | |
| daemon | |
| defaults | |
| log global | |
| mode http | |
| option httplog |
Located in alphabetical order (not prefer)
Cab), also designed as a more modern replacement, written in Cgolang)golang)CScala| @startuml | |
| abstract class Mixinproxy | |
| interface InterfaceOne | |
| interface InterfaceTwo | |
| interface InterfaceBoth | |
| ClassOne <|-- InterfaceOne | |
| ClassTwo <|-- InterfaceTwo | |
| InterfaceBoth <|-- InterfaceOne |
| var Rx = require('rx'); | |
| var zipper = function () { | |
| // Turning arguments from an object into an actual array so we can use things like map() | |
| return Array.prototype.slice.call(arguments); | |
| }; | |
| var array; // Given some array of Observables that you want zipped together | |
| // Or the more classical case where given an array of data to operate on, simply map them into observables |