Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View misskecupbung's full-sized avatar
💤
Thinking ...

Ananda Dwi Ae misskecupbung

💤
Thinking ...
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active April 23, 2024 07:02
Complete list of github markdown emoji markup

People

: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:
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active April 21, 2024 22:10
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:

@cherti
cherti / alert.sh
Created December 9, 2016 13:47
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@atheiman
atheiman / User_Data.md
Last active March 21, 2024 21:15
EC2 User Data examples for Windows and Linux

EC2 User Data examples

Basic Windows local user with Administrator and RDP access

Add a local rdp user via user data at launch of a Windows EC2 instance. Note that this includes a password passed in thru both the user data and powershell command line and is a bad security practice because they can be viewed later. At a minimum, you should connect to the instance immediately after launch and change the password interactively. Also, delete the userdata from the instance after launch. More secure would be to connect the instance to a domain for authentication or use AWS native tooling to connect to the instance (e.g., AWS Session Manager).

<powershell>
# Be sure to set the username and password on these two lines. Of course this is not a good
# security practice to include a password at command line.
@shreyasminocha
shreyasminocha / quotes.json
Last active February 17, 2024 08:18
Quotes for freeCodeCamp Random Quote Machine
[
{
"quote": "Life isn’t about getting and having, it’s about giving and being.",
"author": "Kevin Kruse"
},
{
"quote": "Whatever the mind of man can conceive and believe, it can achieve.",
"author": "Napoleon Hill"
},
{
@yetanotherchris
yetanotherchris / enable-iis-windows-10.ps1
Created May 21, 2016 17:36
Powershell script to enable all IIS, MSMQ and WCF features on Windows 8 and 10.
Import-Module Dism
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationDevelopment
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HealthAndDiagnostics
@gregrahn
gregrahn / tweet2csv.py
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