Skip to content

Instantly share code, notes, and snippets.

@c6p
c6p / reddit-multi-column.user.js
Last active April 29, 2024 23:58
Reddit Multi Column
// ==UserScript==
// @name Reddit Multi Column
// @namespace https://gist.github.com/c6p/463892bb243f611f2a3cfa4268c6435e
// @version 0.1.15
// @description Multi column layout for reddit redesign
// @author Can Altıparmak
// @homepageURL https://gist.github.com/c6p/463892bb243f611f2a3cfa4268c6435e
// @match https://www.reddit.com/*
// @grant none
// ==/UserScript==
@c6p
c6p / github_clone_all.py
Last active November 19, 2015 15:11 — forked from mgedmin/github_mirror.py
Mirror all my github repositories and gists
#!/usr/bin/env python3
# See http://stackoverflow.com/questions/3581031/backup-mirror-github-repositories/13917251#13917251
# Original Author: 'Marius Gedminas <marius@gedmin.as>
# Based on: https://gist.github.com/4319265
import os
import sys
import json
import urllib.request
import subprocess
@c6p
c6p / sesli.sh
Last active August 29, 2015 14:27
SesliSözlük word translation, notification and flashcard reminder
#!/bin/sh
#word=`xsel -o`;
word=''
for i in "$@";
do
word=$word" "$i;
done
html=`wget --no-cookies -q "http://www.seslisozluk.net/$word-nedir-ne-demek/" -O-`;
@c6p
c6p / flashcard.py
Created August 13, 2015 18:46
Simple console FlashCard using Leitner System
#!/usr/bin/python3
from time import time
import sqlite3
from sys import argv
import sys, tty, termios
from textwrap import fill
filepath = "/home/can/.flashcard.sqlite"
def getch():
@c6p
c6p / extract-layers.py
Last active August 29, 2015 14:14
Gimp PythonFu: Extract Visible Layers
#!/usr/bin/env python
from gimpfu import *
import os
def extract_layer(img, layer, path):
if pdb.gimp_item_get_visible(layer):
name = path + '/' + layer.name
if pdb.gimp_item_is_group(layer):
if not os.path.exists(name):
@c6p
c6p / to-yaml.py
Last active August 29, 2015 14:07
Gimp PythonFu: Export Visible Layers to YAML
#!/usr/bin/env python
from gimpfu import *
import os
import yaml
def to_yaml(img, drawable):
name = pdb.gimp_image_get_filename(img)
if not name:
pdb.gimp_message("Export Visible Layers to YAML: File NOT saved!")