Skip to content

Instantly share code, notes, and snippets.

Thinking ...

Ananda Dwi Ae misskecupbung

Thinking ...
View GitHub Profile
cherti /
Created December 9, 2016 13:47
send a dummy alert to prometheus-alertmanager
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
gunjanpatel /
Last active March 19, 2023 19:17
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

rxaviers / gist:7360908
Last active March 22, 2023 19:56
Complete list of github markdown emoji markup
View gist:7360908


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
gregrahn /
Created August 15, 2013 05:20
translate tweet json to a CSV file
#!/usr/bin/env python
# encoding: utf-8
import sys
import urllib
import codecs
import json
import unicodecsv
import dateutil.parser as parser