Skip to content

Instantly share code, notes, and snippets.

View trungdq88's full-sized avatar

Tony Dinh trungdq88

View GitHub Profile
@staltz
staltz / introrx.md
Last active March 29, 2024 06:13
The introduction to Reactive Programming you've been missing
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active March 25, 2024 05:59
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@ahmetb
ahmetb / gcrgc.sh
Last active February 26, 2024 09:14
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@CMCDragonkai
CMCDragonkai / job_control_zsh_bash.md
Last active January 28, 2024 00:45
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@pjambet
pjambet / atomic.rb
Last active July 19, 2023 21:38
Companion code for atomic operations in sql
require 'minitest/autorun'
require 'pg'
require 'mysql2'
require 'sequel'
def get_db(database_name)
case database_name
when :pg
Sequel.connect('postgres://pierre:@localhost:5432/pierre')
when :mysql

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@tlrobinson
tlrobinson / visualize-stacking-contexts.js
Last active January 7, 2022 03:14 — forked from eoinkelly/visualize-stacking-contexts.js
Some console output to help you visualise stacking contexts on a page (no jquery)
/*
Usage:
* Paste this into your dev tools console (or even better as a snippet)
* It will parse the page and find all the things that create a new stacking context
and dump some info about them to the console. It will also outline them on the page.
* This is pretty rough and probably misses heaps of bugs and edge cases.
*/
function highlight(el) {
@jasonrudolph
jasonrudolph / programming-achievements-suggested-by-github-members.md
Created August 19, 2011 21:25
Programming Achievements: Suggestions from the GitHub Community

Programming Achievements: Suggestions from the GitHub Community

Last week, I published some ideas for leveling up as a developer. I put it on GitHub as a gist, and I encouraged people to modify the list to their liking:

Feel free to fork it and add more achievements. (Make sure they're measurable.)

Or, fork it and mark off the achievements you've already conquered. You might even flag the one that you're currently working on.

So far, more than 270 developers have forked this gist. Many devs have customized their forks as personal to-do lists (e.g., crossing off past achievements and highlighting the goal they're currently pursuing). A number of people have also added new achievements to their forks, indicating additional experiences that they

@oivoodoo
oivoodoo / routes.rake
Created March 5, 2013 10:06
rake task for printing grape routes.
namespace :grape do
desc 'Print compiled grape routes'
task :routes => :environment do
API.routes.each do |route|
puts route
end
end
end
@benjamincharity
benjamincharity / gitGrepDirectory.bash
Created February 26, 2016 16:19
Git grep within a specific sub-directory.
# Search for `analytics` only inside `./src/app`
git grep analytics -- "./src/app/*"