Skip to content

Instantly share code, notes, and snippets.

@fffx
fffx / ubuntu-setup.md
Last active August 8, 2017 08:56
my ubuntu-gnome setup

sudo without password for fangxing

#open this file with sudo visudo -f
/etc/sudoers.d/fangxing
fangxing ALL=(ALL) NOPASSWD:ALL

install

sudo apt-get install -f mysql libmysqlclient-dev redis-server git git-extras \
@jagdeepsingh
jagdeepsingh / README.md
Last active March 13, 2023 12:38
Stripe Connect
@ascendbruce
ascendbruce / README.md
Last active May 26, 2024 22:19
Use macOS-style shortcuts in Windows

Use macOS-style shortcuts in Windows / keyboard mappings using a Mac keyboard on Windows

ℹ️ 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.

How does it work

@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active June 10, 2024 08:14
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# 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.
@schneems
schneems / command-line-only-objectspace-trace.sh
Last active December 19, 2022 13:54
trace where Ruby objects come from with this handy bash 3 liner
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

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.

@klappradla
klappradla / debugging_in_jruby.md
Last active March 22, 2024 12:10
Debugging in JRuby

Debugging in JRuby

Step-by-step debugging and stack navigation for JRuby code.

Problem: the common tools byebug and pry-byebug are MRI-only.

Prerequisites

Force JRuby to run in fully interpreted mode:
(otherwise next would behave like step)

@ondrik
ondrik / Dockerfile
Last active August 26, 2022 08:09 — forked from rmoehn/Dockerfile
Dockerfile for running Anki inside a Docker Container on Debian Stable
# 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.
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active June 10, 2024 19:57
Vanilla JavaScript Quick Reference / Cheatsheet
@belohlavek
belohlavek / gh-pages-deploy.md
Last active August 21, 2022 19:33 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

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.

Step 1

Remove the dist directory from the project’s .gitignore (or skip and force-add afterwards).