workflow:
$ rails g model NameOfModel
invoke active_record
create db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb
#!/bin/bash | |
# git pre-commit hook that runs an clang-format stylecheck. | |
# Features: | |
# - abort commit when commit does not comply with the style guidelines | |
# - create a patch of the proposed style changes | |
# modifications for clang-format by [email protected] | |
# This file is part of a set of unofficial pre-commit hooks available | |
# at github. |
#!/bin/bash | |
# Pull this file down, make it executable and run it with sudo | |
# wget https://gist.githubusercontent.com/bryanhunter/10380945/raw/build-erlang-17.0.sh | |
# chmod u+x build-erlang-17.0.sh | |
# sudo ./build-erlang-17.0.sh | |
if [ $(id -u) != "0" ]; then | |
echo "You must be the superuser to run this script" >&2 | |
exit 1 | |
fi |
document.addEventListener('WeixinJSBridgeReady', function(){ | |
//如果执行到这块的代码,就说明是在微信内部浏览器内打开的. | |
alert('当前页面在微信内嵌浏览器中打开!'); | |
}); |
# Sublime Text 3 languages list: | |
ls -1 /Applications/Sublime\ Text.app/Contents/MacOS/Packages/ | |
# Remove all default Sublime Text 3 snippets for Python language | |
export ST3_LANG="Python" | |
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/ | |
unzip -l /Applications/Sublime\ Text.app/Contents/MacOS/Packages/$ST3_LANG.sublime-package | grep '.sublime-snippet' | awk '{print $4}' | while read f; do touch ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/$f; done | |
unset ST3_LANG |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <[email protected]> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
The list would not be updated for now. Don't write comments.
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.
Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:
githubUsers