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
$ cd ~/Downloads/redis-2.4.14
$ make test
$ make
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active November 18, 2024 08:50
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@taoyuan
taoyuan / nodejs.sh
Created February 24, 2016 15:07 — forked from Gioyik/nodejs.sh
Script to cross compile NodeJS for ARMv7
#!/bin/sh -e
#Define our target device
export TARGET_ARCH="-march=armv7-a"
export TARGET_TUNE="-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb"
#Define the cross compilators on your system
export AR="arm-linux-gnueabi-ar"
export CC="arm-linux-gnueabi-gcc"
export CXX="arm-linux-gnueabi-g++"

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.

@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"
@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 / 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 / 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 / pigpiod.service
Created June 21, 2017 05:53
pigpiod systemd script
[Unit]
Description=Gpio daemon
[Service]
ExecStart=/usr/local/bin/pigpiod
Type=forking
[Install]
WantedBy=multi-user.target
#!/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