Skip to content

Instantly share code, notes, and snippets.

View yanyingwang's full-sized avatar
🈲
恶灵静退散 水逆变火箭 🚀 --->

Yanying Wang yanyingwang

🈲
恶灵静退散 水逆变火箭 🚀 --->
View GitHub Profile
/* ~/.config/gtk-3.0/gtk.css */
/*
https://askubuntu.com/questions/221291/remove-ugly-fat-bazel-from-gnome-terminal-with-multiple-tabs
https://www.preining.info/blog/2020/03/de-uglify-gtk3-tabs-of-terminals/
https://bbs.archlinux.org/viewtopic.php?id=221876
https://wiki.archlinux.org/title/Terminator#GTK.2B_customization
*/
@yanyingwang
yanyingwang / scribble-helpers.scrbl
Last active May 23, 2021 14:57
racket scribble helpers
@(define-syntax (examples/racket-input stx)
(syntax-case stx ()
[(_ content ...)
#'(begin
(linebreak)
(linebreak)
(bold "Examples:")
(racketinput content) ...)]))
@examples/racket-input[
@yanyingwang
yanyingwang / mysql_db_sync.rake
Last active February 2, 2016 03:09
a simple rake task to restore development mysql db data with production's
# lib/tasks/db_pull.rake
# set below first on mysql server:
# mysql_config_editor set --login-path=local --host=localhost --user=root --password
#
#
namespace :db do
desc 'Pull production db to development'
task :pull => [:dump, :restore]
task :dump do
@yanyingwang
yanyingwang / deploy.rb
Last active November 11, 2019 14:11
mina+puma+nginx
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
require 'mina/rvm' # for rvm support. (http://rvm.io)
require 'mina/puma'
require 'mina/nginx'
# Basic settings:
@yanyingwang
yanyingwang / ubuntu-bug1310346-resolve.sh
Created December 18, 2015 07:18
a simple bash script to fix ubuntu 14.04's bug 1310346
#!/usr/bin/env bash
#
# Find and view it at link here:
# https://github.com/wyying/bash_scripts/blob/master/tools/ubuntu-bug1310346-resolve.sh
#
# Download and update it at link here:
# https://raw.githubusercontent.com/wyying/bash_scripts/master/tools/ubuntu-bug1310346-resolve.sh
#
#
#
@yanyingwang
yanyingwang / init.sh
Created December 18, 2015 07:11
a simple rails deployment script.
#!/usr/bin/env bash
production=172.11.22.33
port=8080
apphome=/home/web/rails-demo
current_ip=$(/sbin/ip a s|sed -ne '/127.0.0.1/!{s/^[ \t]*inet[ \t]*\([0-9.]\+\)\/.*$/\1/p}' |grep 172)
make_sure_production() {