Skip to content

Instantly share code, notes, and snippets.

View MichaelCurrin's full-sized avatar

Michael Currin MichaelCurrin

  • The Netherlands
View GitHub Profile
@dtiemann83
dtiemann83 / gitautotag.sh
Last active June 12, 2023 13:58
A quick BASH script to automatically add a git tag by incrementing --major --minor --bug version, based on (most recent) previous tag.
#!/bin/bash
CURTAG=`git describe --abbrev=0 --tags`;
CURTAG="${CURTAG/v/}"
IFS='.' read -a vers <<< "$CURTAG"
MAJ=${vers[0]}
MIN=${vers[1]}
BUG=${vers[2]}
@DirtyF
DirtyF / README.md
Last active April 11, 2021 17:24
Setup Jekyll on macOS with brew and rbenv - See https://jekyllrb.com/docs/installation/macos/

First, make sure you have command line tools installed:

xcode-select --install

Then open Terminal.app and type:

curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/fbc736fa1b50bd637929a315e6803df306c8bc8e/setup-rbenv.sh | bash
@suriyadeepan
suriyadeepan / scrape_hashtags.py
Created September 13, 2016 08:07
Selenium based Twitter Scrapper
from bs4 import BeautifulSoup
import requests
import time
import sys
import os
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
@edsu
edsu / replies.py
Last active December 7, 2022 18:59
Try to get replies to a particular set of tweets, recursively.
#!/usr/bin/env python
"""
Twitter's API doesn't allow you to get replies to a particular tweet. Strange
but true. But you can use Twitter's Search API to search for tweets that are
directed at a particular user, and then search through the results to see if
any are replies to a given tweet. You probably are also interested in the
replies to any replies as well, so the process is recursive. The big caveat
here is that the search API only returns results for the last 7 days. So
@subfuzion
subfuzion / github-wiki-how-to.md
Last active April 20, 2024 09:22
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@parmentf
parmentf / GitCommitEmoji.md
Last active May 5, 2024 13:32
Git Commit message Emoji
@claymcleod
claymcleod / pycurses.py
Last active May 1, 2024 14:44
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active April 29, 2024 19:14
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@Phlow
Phlow / for-loop-sorted-collection
Last active April 30, 2024 13:30
This Liquid loop for Jekyll sorts a collection by date in reverse order
{% comment %}
*
* This loop loops through a collection called `collection_name`
* and sorts it by the front matter variable `date` and than filters
* the collection with `reverse` in reverse order
*
* To make it work you first have to assign the data to a new string
* called `sorted`.
*
{% endcomment %}
@azadkuh
azadkuh / vim-cheatsheet.md
Last active May 3, 2024 11:50
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...