Skip to content

Instantly share code, notes, and snippets.

View eugenius1's full-sized avatar

Eusebius Ngemera eugenius1

View GitHub Profile
@yohfee
yohfee / convert.sh
Created January 8, 2011 14:05
convert.sh
for jpeg in `find . -name "*.JPG"`
do
convert -geometry 28.4090909% $jpeg ${jpeg%.*}.jpg
done
@thebigreason
thebigreason / social-sharing-alignment.html
Created October 18, 2011 17:48
Align Facebook Like, Twitter Tweet and Google +1 buttons
<div class="social">
<span class="twitter">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="[your-url-here]">Tweet</a>
</span>
<span class="google">
<g:plusone size="medium" href="[your-url-here]"></g:plusone>
</span>
<span class="Facebook">
<iframe src="https://www.facebook.com/plugins/like.php?href=[your-url-here]&amp;show_faces=false&amp;layout=button_count" scrolling="no" frameborder="0" style="height: 21px; width: 100px" allowTransparency="true"></iframe>
</span>
@nsfyn55
nsfyn55 / reverse.py
Last active October 17, 2018 22:09
Reverse Singly Linked List Python
class Node:
def __init__(self,val,nxt):
self.val = val
self.nxt = nxt
def prnt(n):
nxt = n.nxt
print n.val
if(nxt is not None):
prnt(nxt)
@jonikarppinen
jonikarppinen / markdown-comments.md
Last active June 11, 2024 17:59
How to comment out stuff in Markdown on GitHub?

Comments in GitHub flavour of Markdown

As answers to this Stack Overflow question reveal, using <!--- and ---> or <!-- and --> works (view source by clicking "Raw"):

Task Time required Assigned to Current Status Finished
Calendar Cache > 5 hours - in progress - [x] ok?
Object Cache > 5 hours - in progress [x] item1
[ ] item2
Object Cache > 5 hours - in progress
  • item1
  • item2
Object Cache > 5 hours - in progress
  • item1
  • item2
  • works
  • works too
import requests
import ujson
from pprint import pprint
from random import SystemRandom
from string import digits, ascii_uppercase
from time import sleep
possible_characters = ascii_uppercase + digits
def gp(length=32):
@icyflame
icyflame / to_https.sh
Last active February 12, 2022 16:12 — forked from michaelsilver/fix_github_https_repo.sh
Convert all GitHub git remotes to SSH or HTTPS.
#/bin/bash
#-- Script to automatically convert all git remotes to HTTPS from SSH
# Script will change all the git remotes.
# If you didn't intend to do that, run the other script in this repo.
# Original 1: https://gist.github.com/m14t/3056747
# Original 2: https://gist.github.com/chuckbjones/9dc6634fe52e56ba45ac
# Thanks to @m14t, @michaelsilver and @chuckbjones.
ssh_to_https(){
REPO_URL=`git remote -v | grep -m1 "^$1" | sed -Ene's#.*(git@github.com:[^[:space:]]*).*#\1#p'`
@eugenius1
eugenius1 / compress-img.sh
Last active July 31, 2016 02:02
Compress all JPG's in a folder to another folder
# http://www.imagemagick.org/script/command-line-processing.php#geometry
# http://stackoverflow.com/questions/7261855/recommendation-for-compressing-jpg-files-with-imagemagick
# run from raw/
cd raw/
for pic in img/covers/*.jpg;
do convert -strip -quality 80% -interlace Plane -gaussian-blur 0.05 -resize "1920>" "$pic" "../$pic";
done