Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

ednew2018 ednew2018

🎯
Focusing
  • USA
Block or report user

Report or block ednew2018

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
View ss_v2ray_plugin.md
@brettscott
brettscott / aes-256-cbc-test.js
Last active Jan 20, 2020
AES 256 CBC encryption between Golang and Node JS
View aes-256-cbc-test.js
// Node v6.9.0
//
// TEST FILE (cut down for simplicity)
// To ensure Golang encrypted string can be decrypted in NodeJS.
//
let crypto;
try {
crypto = require('crypto');
View 0-bridging-react-native-cheatsheet.md
@vlucas
vlucas / encryption.js
Last active Jan 23, 2020
Stronger Encryption and Decryption in Node.js
View encryption.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@dalhundal
dalhundal / namecheap-ddns.sh
Created May 4, 2014
Shell script to update namecheap.com dynamic dns for a domain with your external IP address
View namecheap-ddns.sh
#!/bin/sh
# Shell script to update namecheap.com dynamic dns
# for a domain to your external IP address
HOSTNAME=yoursubdomain
DOMAIN=yourdomainname.com
PASSWORD=y0urp455w0rd
IP=`curl -s echoip.com`
@iros
iros / API.md
Created Aug 22, 2012
Documenting your REST API
View API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@youtalk
youtalk / redirect.http2https.js
Created Jul 31, 2012
Automatic redirection from HTTP to HTTPS with Node.js
View redirect.http2https.js
app.configure(function () {
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.configure('production', function () {
app.use (function (req, res, next) {
var schema = (req.headers['x-forwarded-proto'] || '').toLowerCase();
if (schema === 'https') {
@ryanmcgrath
ryanmcgrath / JapaneseRegex.js
Created May 20, 2011 — forked from sym3tri/JapaneseRegex.js
Regex to test for presence of Japanese characters
View JapaneseRegex.js
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation
You can’t perform that action at this time.