#open this file with sudo visudo -f
/etc/sudoers.d/fangxing
fangxing ALL=(ALL) NOPASSWD:ALL
sudo apt-get install -f mysql libmysqlclient-dev redis-server git git-extras \
Links:
Contents:
ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows
Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)
With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
echo 'require "objspace"; ObjectSpace.trace_object_allocations_start; Kernel.send(:define_method, :sup) do |obj| ; puts "#{ ObjectSpace.allocation_sourcefile(obj) }:#{ ObjectSpace.allocation_sourceline(obj) }"; end' > tmp/tmp-gemfile | |
cat Gemfile >> tmp/tmp-gemfile | |
cat tmp/tmp-gemfile > Gemfile | |
# $ bundle exec irb | |
# irb(main):001:0> require 'rails' | |
# => true | |
# irb(main):002:0> sup(Rails) | |
# /Users/richardschneeman/.gem/ruby/2.4.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:3 |
This is a list of the most helpful keyboard commands I use within top.
h
shows help on interactive commands. Also see the top manual page
q
to quit the program.
Step-by-step debugging and stack navigation for JRuby code.
Problem: the common tools byebug and pry-byebug are MRI-only.
Force JRuby to run in fully interpreted mode:
(otherwise next
would behave like step
)
# Credits: | |
# | |
# - http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/ | |
# - https://github.com/jfrazelle/dockerfiles/blob/master/spotify/Dockerfile | |
# | |
# Prepare (example): | |
# | |
# $ mkdir AnkiDocker | |
# $ cd AnkiDocker | |
# $ # Save this file to Dockerfile and adapt it to your needs. |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. Here's how to do it:
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
(or skip and force-add afterwards).