Skip to content

Instantly share code, notes, and snippets.

View XGHeaven's full-sized avatar
🐟
Finding web future

Bradley Xu XGHeaven

🐟
Finding web future
View GitHub Profile
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active June 29, 2024 18:18
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@Matrixbirds
Matrixbirds / AI.js
Created December 14, 2018 03:17
No License No Limit Anybody can use it
#!/usr/bin/env node
require('readline').createInterface({input: process.stdin,output: process.stdout}).on('line', (answer) => console.log("葬爱家族村口王师傅: ", answer.replace(/吗?\?$/g, '!')))
@Pompeu
Pompeu / vim_8_build
Created August 28, 2018 11:39 — forked from rodtreweek/vim_8_build
Building Vim 8 from source.
1.
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git
2.
sudo apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common vim-nox
3.
cd ~
git clone https://github.com/vim/vim.git
cd vim
@ankurk91
ankurk91 / github_gpg_key.md
Last active June 7, 2024 14:31
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@ggrandes
ggrandes / cert-generator-with-int.sh
Last active September 9, 2021 11:53
Generate X.509 Certificate (Server/Client/Mail) with OpenSSL and Intermediate CA - Linux
#!/bin/bash
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Original Source:
# https://gist.github.com/ggrandes/c1765904e804db15b8c57d90299d006f
#
@XGHeaven
XGHeaven / uncarryThis.js
Created February 1, 2016 04:59
JavaScript Magic Technology
/**
* call wrapper function is equal to use call/apply to invoke function
* see follow usage
*
* @param {Function} f - need to wrapper function
*/
var uncurryThis = function(f) {
var call = Function.call;
return function() {
return call.apply(f, arguments);
@mcfog
mcfog / gitabbr.fish
Last active November 29, 2019 07:43
abbr g git
abbr ga 'git add'
abbr gaa 'git add --all'
abbr gb 'git branch'
abbr gbda git\ branch\ --merged\ \|\ command\ grep\ -vE\ \"\^\(\\\*\|\\s\*master\\s\*\\\$\)\"\ \|\ command\ xargs\ -n\ 1\ git\ branch\ -d
abbr gbnm 'git branch --no-merged'
abbr gbr 'git branch --remote'
abbr gc 'git commit -v'
abbr gc! 'git commit -v --amend'
abbr gca 'git commit -v -a'
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
@rmoff
rmoff / foo.md
Last active January 5, 2024 17:17
cx_Oracle install on MacOS
  1. Download Instant Client:
  • instantclient-basic-macos.x64-11.2.0.4.0.zip
  • instantclient-sdk-macos.x64-11.2.0.4.0.zip
  • instantclient-sqlplus-macos.x64-11.2.0.4.0.zip
  1. Unzip and move to /opt

  2. Create symlink

@james2doyle
james2doyle / node-base64-encode.js
Last active February 2, 2023 23:53
base64 encode a file with node.js and auto-detect the mimetype.
// to run: node node-base64-encode.js file
const mime = require('mime'); // npm install mime
const path = require('path');
const fs = require('fs');
// path to the file we passed in
const filepath = path.resolve(process.argv[2]);
// get the mimetype
const filemime = mime.getType(filepath);