Skip to content

Instantly share code, notes, and snippets.

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

Xinyu Liu meteorlxy

👀
Emmmm...?
  • Hangzhou, China
  • 05:12 (UTC +08:00)
View GitHub Profile
@matinrco
matinrco / gitProxy.md
Last active September 6, 2024 06:03
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 December 30, 2024 18:50
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 September 7, 2024 14:28
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() {