For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
public class EnumMapper : IDisposable | |
{ | |
readonly Dictionary<Type, Dictionary<string, object>> _stringsToEnums = | |
new Dictionary<Type, Dictionary<string, object>>( ) ; | |
readonly Dictionary<Type, Dictionary<int, string>> _enumNumbersToStrings = | |
new Dictionary<Type, Dictionary<int, string>>( ) ; | |
readonly ReaderWriterLockSlim _lock = new ReaderWriterLockSlim( ) ; |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
$wc=new-object net.webclient | |
$wp=[system.net.WebProxy]::GetDefaultProxy() | |
$wp.UseDefaultCredentials=$true | |
$wc.Proxy=$wp | |
iex ($wc.DownloadString('https://chocolatey.org/install.ps1')) |
#include <iostream> | |
template <typename T> | |
class range { | |
private: | |
class iter { | |
private: | |
T m_x; | |
public: |
// Params: | |
// 1. query (filter) if you only want to remove this field from some records. {} will select any. | |
// 2. $unset the field(s) that you want to remove. Here I've set them to null but the value doesn't matter as it's ignored. | |
// 3. multi must be set to true otherwise it will only operate on the first record that it finds. | |
// | |
// Run this command in the MongoDB shell | |
db.<collectionName>.update( {}, {$unset: {<fieldName1>: null, <fieldName2>: null}}, {multi: true}); |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
# copied from http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ | |
git clone <git repository A url> # clone source repository | |
cd <git repository A directory> | |
git remote rm origin # to make sure it doesn't affect the original repository | |
git filter-branch --subdirectory-filter <directory 1> -- --all # remove all files other than the ones needed | |
mkdir <directory 1> # move them into another directory where they will be stored in the destination repository (if needed) | |
mv * <directory 1> | |
git add . | |
git commit |
Hello there! You are currently visiting gopherspace through a | |
proxy. To learn more about gopher and how to browse it, read this. | |
______________________________________________________________________ | |
################################################################### | |
Writing C software without the standard library | |
Linux Edition | |
################################################################### | |
There are many tutorials on the web that explain how to build a | |
simple hello world in C without the libc on AMD64, but most of them |