I hereby claim:
- I am llCorvinSll on github.
- I am corvinus (https://keybase.io/corvinus) on keybase.
- I have a public key whose fingerprint is 5FC2 D0BE 153C A554 B993 F53F E8E2 8A2F 73A0 09A2
To claim this, I am signing this object:
include( ../common.pri ) | |
TEMPLATE = app | |
SOURCES += main.cpp | |
LIBS += -L../logic -llogic \ | |
-L../gui -lgui | |
# Will build the final executable in the main project directory. |
public static string GeneratePassword(string secret, long iterationNumber, int digits = 6) | |
{ | |
byte[] counter = BitConverter.GetBytes(iterationNumber); | |
if (BitConverter.IsLittleEndian) | |
Array.Reverse(counter); | |
byte[] key = Encoding.ASCII.GetBytes(secret); | |
HMACSHA1 hmac = new HMACSHA1(key, true); |
I hereby claim:
To claim this, I am signing this object:
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
Func<FakeEnumType, string> getName = en => | |
{ | |
var type = typeof(FakeEnumType); | |
var memInfo = type.GetMember(en.ToString()); | |
var attributes = memInfo[0] | |
.GetCustomAttributes(typeof(DisplayAttribute), false); | |
return ((DisplayAttribute)attributes[0]).Name; | |
} |
class Client | |
{ | |
public static TClient CreateInst<TClient, TInterface>(string url, string domain, string username, string password) | |
where TClient : System.ServiceModel.ClientBase<TInterface> | |
where TInterface : class | |
{ | |
BasicHttpBinding binding = new BasicHttpBinding(); | |
binding.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential; | |
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows; |
.arrow { | |
height: 15px; | |
width: 0px; | |
border-top: 15px solid rgba(0,0,0,0.75); | |
border-right: 15px solid transparent; | |
border-left: 15px solid transparent; | |
bottom: -15px; | |
content: ''; | |
display: block; | |
} |
$.fn.serializeObject = function() | |
{ | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name]) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); |
void Main() { string str = "2a00:1450:4010:c04::71"; System.Net.IPAddress addr = System.Net.IPAddress.Parse(str); var bytes = addr.GetAddressBytes(); var preferredFormatString = string.Format("{0:x2}{1:x2}:{2:x2}{3:x2}:{4:x2}{5:x2}:{6:x2}{7:x2}:{8:x2}{9:x2}:{10:x2}{11:x2}:{12:x2}{13:x2}:{14:x2}{15:x2}", bytes [0], bytes [1], bytes [2], bytes [3], bytes [4], bytes [5], bytes [6], bytes [7], bytes [8], bytes [9], bytes [10], bytes [11], bytes [12], bytes [13], bytes [14], bytes [15]); Console.WriteLine (preferredFormatString); Console.Write(addr); } // Define other methods and classes here |