Skip to content

Instantly share code, notes, and snippets.

View meteorlxy's full-sized avatar
👀
Emmmm...?

Xinyu Liu meteorlxy

👀
Emmmm...?
  • Hangzhou, China
  • 17:30 (UTC +08:00)
View GitHub Profile
@matinrco
matinrco / gitProxy.md
Last active January 26, 2024 15:06
Configure git/ssh to use socks/http proxy in windows, linux & wsl2

Windows

Add this to your ssh config file ( which is located in %USERPROFILE%\.ssh\config ) or create one if it's missing:

Http proxy & repo access via ssh:

Host *
    ProxyCommand "C:/Program Files/Git/mingw64/bin/connect.exe" -H {proxyserver}:{port} %h %p

or (for specific host name)

Host gitlab.com
@rxaviers
rxaviers / gist:7360908
Last active April 25, 2024 09:09
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@stongo
stongo / app.js
Last active January 23, 2024 18:48
Joi validation in a Mongoose model
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
var db = mongoose.connection;
db.on('error', function() {
return console.error.bind(console, 'connection error: ');
});
@thejoshwolfe
thejoshwolfe / random128.js
Last active September 5, 2019 05:57
Generates a 128-bit random number as a string.
/** random 128-bit number as a string */
function random128() {
var result = "";
for (var i = 0; i < 8; i++)
result += String.fromCharCode(Math.random() * 0x10000);
return result;
}
/** random 128-bit number in canonical uuid format. all bits are random. */
function random128Hex() {