Skip to content

Instantly share code, notes, and snippets.

View embs's full-sized avatar

Matheus Santana embs

View GitHub Profile
@kaspermeyer
kaspermeyer / jquery_event_delegator.coffee
Created December 13, 2018 14:06
Dispatch jQuery events as regular DOM events
# ~ Dispatch jQuery events as regular DOM events ~
#
# Delegated events are given a new name in the format `jquery:<original event name>`.
# If you delegate `ajax:send` you will be able to listen for `jquery:ajax:send`
# on native event listeners such as Stimulus actions and `EventTarget.addEventListener`.
#
# Notes:
# * The first parameter must be called "event".
# * The parameters can be accessed as members on the `event.detail` object.
#
Jenkinsfile VIM syntax highlighting
echo 'au BufNewFile,BufRead Jenkinsfile setf groovy' >> ~/.vimrc
title: chatwork
emojis:
- name: "cw_smile"
aliases:
- "cw_:)"
src: "https://assets.chatwork.com/images/emoticon2x/emo_smile.gif"
- name: "cw_sad"
aliases:
- "cw_:("
src: "https://assets.chatwork.com/images/emoticon2x/emo_sad.gif"
@sergiofontes
sergiofontes / .scss-lint.yml
Last active May 24, 2020 06:18
Syntacss standards configuration file for SCSS Lint
# Default application configuration that all configurations inherit from.
scss_files:
- "**/*.scss"
- "docs/assets/scss/**/*.scss"
plugin_directories: ['.scss-linters']
# List of gem names to load custom linters from (make sure they are already
# installed)
plugin_gems: []
I have run an nginx container...
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6d67de07731d nginx "nginx -g 'daemon ..." 40 minutes ago Up 40 minutes 80/tcp, 443/tcp epic_goldberg
I want to use Debian for debug:
docker run -it --pid=container:6d67de07731d --net=container:6d67de07731d --cap-add sys_admin debian
I can see the nginx process:
@AnthonyDiGirolamo
AnthonyDiGirolamo / .Xresources
Created August 27, 2016 04:00
Xresources example
! Font options - ~/.fonts.conf seems to override this
! Resolution for Xft in dots per inch (e.g. 96)
!Xft.dpi: 128
! Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)
!Xft.rgba: rgba
!Xft.antialias: 1
!Xft.hinting: 1
!Xft.autohint: 0
! What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)
!Xft.hintstyle: hintslight
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active August 16, 2024 13:39
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@embs
embs / mp42gif.bash
Last active July 14, 2020 17:10
Mp4 to GIF
mkdir frames
ffmpeg -i screencast.mp4 -r 5 'frames/frame-%03d.jpg'
cd frames
convert -delay 20 -loop 0 -layers Optimize *.jpg myimage.gif
@lmarkus
lmarkus / README.MD
Last active October 3, 2024 18:13
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@rponte
rponte / get-latest-tag-on-git.sh
Last active October 17, 2024 20:03
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples