Skip to content

Instantly share code, notes, and snippets.

View artu-hnrq's full-sized avatar

Arthur Henrique artu-hnrq

View GitHub Profile
@ackvf
ackvf / README.md
Last active November 17, 2023 14:49
TypeScript type toolbelt
@hkan
hkan / whatsapp-web-emoji-keywords.txt
Created April 30, 2018 16:25
Emoji shortcut keywords for Whatsapp Web
0⃣ 0, keycap, zero
1⃣ 1, number, one
🕜 1, 30, clock, time, one, thirty, 1:30, one-thirty
🕐 1, clock, time, one, 00, o’clock, 1:00, one o’clock
2⃣ 2, number, two
🕝 2, 30, clock, time, two, thirty, 2:30, two-thirty
🕑 2, clock, time, two, 00, o’clock, 2:00, two o’clock
3⃣ 3, keycap, three
🕞 3, 30, three, clock, time, thirty, 3:30, three-thirty
🕒 3, three, clock, time, 00, o’clock, 3:00, three o’clock
@joseluisq
joseluisq / stash_dropped.md
Last active May 27, 2024 16:39
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@jefftriplett
jefftriplett / .dockerignore
Last active November 20, 2022 21:44
How I use Docker and Compose
.*
!.coveragerc
!.env
!.pylintrc
@ntpz
ntpz / Makefile
Created May 2, 2015 15:42
Makefile for Google app engine project
PYTHON = python
APPENGINE = /usr/local/google_appengine
APPCFG = $(PYTHON) $(APPENGINE)/appcfg.py
APP_ID = (YOUR-APP-ID)
EMAIL = (YOUR-EMAIL)
SERVE_PORT = 8080
ADMIN_PORT = 8000
SERVE_ADDRESS = 0.0.0.0
DATASTORE_PATH = ./datastore.sqlite3
@tswaters
tswaters / git-subdirectory-tracking.md
Last active May 28, 2024 19:04
Adding subdirectory of a remote repo to a subdirectory in local repo

This is way more complicated than it should be. The following conditions need to be met :

  1. need to be able to track and merge in upstream changes
  2. don't want remote commit messages in master
  3. only interested in sub-directory of another repo
  4. needs to go in a subdirectory in my repo.

In this particular case, I'm interested in bringing in the 'default' template of jsdoc as a sub-directory in my project so I could potentially make changes to the markup it genereates while also being able to update from upstream if there are changes. Ideally their template should be a separate repo added to jsdoc via a submodule -- this way I could fork it and things would be much easier.... but, it is what it is.

After much struggling with git, subtree and git-subtree, I ended up finding this http://archive.h2ik.co/2011/03/having-fun-with-git-subtree/ -- it basically sets up separate branches from tracking remote, the particular sub-directory, and uses git subtree contrib module to pull it all togther. Following are

@korya
korya / Subfolder to git repo.md
Last active December 16, 2023 10:29
Convert subfolder into Git submodule
@jgatjens
jgatjens / direcory_tag.rb
Created February 10, 2014 22:03
jekyll-plugin loop_directory
#usage:
#{% loop_directory directory:images iterator:image filter:*.jpg sort:descending %}
# <img src="{{ image }}" />
#{% endloop_directory %}
module Jekyll
class LoopDirectoryTag < Liquid::Block
include Liquid::StandardFilters
Syntax = /(#{Liquid::QuotedFragment}+)?/
@seanbuscay
seanbuscay / git_create_orphan.sh
Created June 27, 2013 15:26
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name