Skip to content

Instantly share code, notes, and snippets.

View taoyuan's full-sized avatar
:octocat:
I may be slow to respond.

TY taoyuan

:octocat:
I may be slow to respond.
View GitHub Profile
@taoyuan
taoyuan / enterprise_token.rb
Created November 15, 2022 05:19 — forked from markasoftware/enterprise_token.rb
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2020 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
@taoyuan
taoyuan / Clone-All-Repos-GitHub-Organization.md
Created June 24, 2020 06:03 — forked from nucliweb/Clone-All-Repos-GitHub-Organization.md
Clone all repos from a GitHub organization

Publics repos

With Ruby 1.8 (default version on MacOS) :

sudo gem install json
curl -s https://api.github.com/orgs/[ORGANIZATION]/repos | ruby -rubygems -e 'require “json”; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'

With Ruby 1.9+, the json library is by default thus you just use :

@taoyuan
taoyuan / privoxy_socks5_http_proxy.md
Last active November 28, 2019 02:03 — forked from alexniver/golang, ubuntu go get in china.md
ubuntu下, 使用 Privoxy 转换 socks5 到 http_proxy

#解决方案 Socks5 + Privoxy

思路就是, 建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.

shadowsock

sudo apt-get install python-pip
@taoyuan
taoyuan / install-nodejs.sh
Created December 25, 2017 12:47 — forked from TooTallNate/install-nodejs.sh
Simple Node.js installation script using the precompiled binary tarballs
#!/bin/sh
VERSION=0.8.6
PLATFORM=darwin
ARCH=x64
PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"
mkdir -p "$PREFIX" && \
curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
| tar xzvf - --strip-components=1 -C "$PREFIX"
#!/bin/sh
### BEGIN INIT INFO
# Provides: dockercompose
# Required-Start: $docker
# Required-Stop: $docker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Docker Services
### END INIT INFO
@taoyuan
taoyuan / rabbitmq.txt
Created May 29, 2017 11:01 — forked from sdieunidou/rabbitmq.txt
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
@taoyuan
taoyuan / qemu_osx_rpi_raspbian_jessie.sh
Created April 27, 2017 06:26 — forked from hfreire/qemu_osx_rpi_raspbian_jessie.sh
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@taoyuan
taoyuan / roles_invesitgation.md
Created October 31, 2016 14:03 — forked from facultymatt/roles_invesitgation.md
Roles and permissions system for Nodejs
@taoyuan
taoyuan / mongo_backup.sh
Created October 27, 2016 05:48 — forked from sheharyarn/mongo_backup.sh
Mongodump Shell Script for Cronjob
#!/bin/bash
MONGO_DATABASE="your_db_name"
APP_NAME="your_app_name"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/home/username/backups/$APP_NAME"

Avatar Generator from Name

A name (first name and surname) is input and output using the initials from the name and a background colour (based on the first name first letter). The background colours are from from http://flatuicolors.com/

A Pen by Victor Fernandez on CodePen.

License.