Skip to content

Instantly share code, notes, and snippets.

View juancarlosfarah's full-sized avatar
🧠

Juan Carlos Farah juancarlosfarah

🧠
View GitHub Profile
@todgru
todgru / aws-ec2-redis-cli.md
Created June 12, 2014 23:01
AWS redis-cli on EC2
@alexnaspo
alexnaspo / gist:9e3f2bdf4e6400c4be74
Created September 23, 2014 17:48
backgrid datetimepicker cell with bootstrap 3
# create a datetimepicker cell when using backgrid and the bootstrap3-datetimepicker
# this can be modified to work with other datepicker libraries
# http://eonasdan.github.io/bootstrap-datetimepicker/
# http://backgridjs.com/
MyDatePickerCellEditor = Backgrid.InputCellEditor.extend(
events: {}
initialize: ->
Backgrid.InputCellEditor::initialize.apply this, arguments
input = this
@smockle
smockle / One Dark.terminal
Created February 18, 2015 23:34
An OS X Terminal profile to match Atom Editor's One Dark syntax theme. Thanks to https://github.com/nathanbuchar/one-dark-terminal for the inspiration!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAw
IDAAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
@rponte
rponte / get-latest-tag-on-git.sh
Last active July 4, 2024 10:55
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
@ryanthegiantlion
ryanthegiantlion / createfirewallrules_restrictive.sh
Created December 24, 2015 19:29
Firewall rules I used on my single node elasticsearch instance
# flush existing rules
iptables -F
ip6tables -F
# ssh rule. always add this first !
# TODO: Consider rate limiting? (e.g http://www.digitalsanctuary.com/tech-blog/debian/using-iptables-to-prevent-ssh-brute-force-attacks.html)
# Still need to read up on implications...
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A OUTPUT -p tcp --sport ssh -j ACCEPT
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active June 5, 2024 21:05
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 
@opyate
opyate / commit-msg
Created October 10, 2017 09:33
JIRA code commit msg hook; presumes merges happen on remote (via PR mechanism, etc)
#!/bin/sh
# .git/hooks/commit-msg
test "" != "$(egrep '[A-Z]{3,}-\d+' "$1")" || {
echo >&2 Commit message requires JIRA code.
exit 1
}