Skip to content

Instantly share code, notes, and snippets.

blackgat

Block or report user

Report or block blackgat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ccckmit
ccckmit / gist:b0a90a7bd9d3d3e5baa8
Last active Aug 29, 2015
javascript version of enigma machine (in world war II)
View gist:b0a90a7bd9d3d3e5baa8
// 原始程式來源: http://practicalcryptography.com/ciphers/enigma-cipher/ 網頁內的 javascript 程式碼
var c = console;
var plaintext = 'ABCDEF';
c.log('>> plaintext2 : '+plaintext);
var ciphertext = Encrypt(plaintext, 'AAA', 'AAA', '123', 'POMLIUKJNHYTGBVFREDC');
c.log('>> ciphertext : '+ciphertext);
var plaintext2 = Encrypt(ciphertext, 'AAA', 'AAA', '123', 'POMLIUKJNHYTGBVFREDC');
c.log('>> plaintext2 : '+plaintext);
@foozmeat
foozmeat / openssl-build.sh
Last active Sep 19, 2019
A shell script to build openssl for iOS and Mac. It currently builds: Mac -> i386 & x86_64 // iOS -> armv7, arm64 // iOS Simulator -> i386 & x86_64.
View openssl-build.sh
#!/bin/bash
# This script builds the iOS and Mac openSSL libraries
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script
# Credits:
# https://github.com/st3fan/ios-openssl
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh
@zmilojko
zmilojko / UDPer.cs
Last active Oct 13, 2019
C# sends and receives UDP broadcasts
View UDPer.cs
using System;
using System.Net.Sockets;
using System.Net;
using System.Text;
using System.Threading;
namespace UDPer
{
class UDPer
{
@return1
return1 / trim_enabler.txt
Last active Jul 5, 2019
TRIM Enabler for OS X Yosemite 10.10.3
View trim_enabler.txt
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
You can’t perform that action at this time.