Skip to content

Instantly share code, notes, and snippets.

View ivoarch's full-sized avatar

ivoarch (Ivaylo Kuzev) ivoarch

View GitHub Profile
@endolith
endolith / export_google_starred_locations.py
Created October 16, 2012 02:29
Export Google Maps starred locations
# -*- coding: utf-8 -*-
"""
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
"""
@ivoarch
ivoarch / runorraise.diff
Last active October 12, 2015 23:57
equivalent to stumpwm's [run-or-raise] action for DWM
--- config.def.h.orig 2013-11-29 13:55:53.503216554 +0100
+++ config.def.h 2013-11-29 13:56:58.268191528 +0100
@@ -53,12 +53,14 @@
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", se\
lbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "st", NULL };
+static const char *emacs[] = { "emacs", NULL, NULL, NULL, "Emacs" };
@benizi
benizi / simpler
Created November 30, 2012 05:26 — forked from justinabrahms/colortest.py
Show how different terminals show bold colors
#!/bin/sh
# Print four lines showing blocks of colors: 0-7 | 0-7bold | 8-15 | 8-15bold
perl -CADS -lwe '
my $block = shift || (chr(0x2588) x 3);
for (["", 0], ["1;", 0], ["", 8], ["1;", 8]) {
my ($bold, $offset) = @$_;
my @range = map $offset + $_, 0..7;
printf "%s %-6s ", $bold ? "bold" : "norm", "$range[0]-$range[-1]";
print map("\e[${bold}38;5;${_}m$block", @range), "\e[0m"
}
@jpouellet
jpouellet / zbell.sh
Last active November 24, 2023 10:49
Makes Zsh print a bell when long-running commands finish. I use this in combination with i3 and throw big compile jobs (or whatever it may be) into another workspace to get a nice visual notification (workspace indicator turns red) when it's done so I don't need to waste time regularly checking on it.
#!/usr/bin/env zsh
# This script prints a bell character when a command finishes
# if it has been running for longer than $zbell_duration seconds.
# If there are programs that you know run long that you don't
# want to bell after, then add them to $zbell_ignore.
#
# This script uses only zsh builtins so its fast, there's no needless
# forking, and its only dependency is zsh and its standard modules
#
@redchair123
redchair123 / find_unlicensed_repos.sh
Last active December 16, 2015 11:19
Simple shell script to find unlicensed repos on github
#!/bin/bash
# Copyright (c) 2013 Niggler
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTW
@cheeaun
cheeaun / firefoxos-phone-observations.md
Last active December 16, 2015 23:59
My observations on using Firefox OS phone, Peak, since 2 May 2013

My observations on using Firefox OS phone, Peak, since 2 May 2013

  • Auto-brightness is constantly changing when switching apps or views of an app, eventhough the surrounding ambient light doesn't change much. I've disabled it.
  • Press both 'Home' button and 'Sleep/wake' button, takes screenshot, like iPhone.
  • Gallery, Camera, Music app, etc don't work without a microSD memory card in the phone.
  • If 'USB mass storage' option is enabled in Settings app -> 'Media storage', Gallery and Camera app doesn't work while plugged in (charging) to the computer, stating that the memory card is in use.
  • 3 ways to install web apps; via Marketplace, Firefox browser or the Search screen. Sometimes generate different icons on the Home screen from each method.
  • Firefox browser seems to have a viewport issue, where web pages seems to be 2x zoomed out. Once the web page is added to Home screen, relaunch from there, the web page is no longer 2x zoomed out. [1] Marketplace app somehow still have issue.
  • Scrolling on t
@AaronTheApe
AaronTheApe / emacs.repo
Created May 8, 2013 12:05
Emacs 24 CentOS Repo
[emacs]
name=Emacs 24.2 repo
baseurl=http://pj.freefaculty.org/EL/6/x86_64/
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=http://pj.freefaculty.org/EL/PaulJohnson-BinaryPackageSigningKey
@nirbheek
nirbheek / set_gnome-terminal_transparency.sh
Last active March 6, 2024 09:41
A tiny script to set the transparency for X windows. If AUTOMAGIC_MODE is "true", it tries to find all gnome-terminal windows and applies the transparency to all of them.
#!/bin/bash
# vim: set sts=4 sw=4 et tw=0 :
#
# License: BSD
AUTOMAGIC_MODE="true"
OPACITY_100="0xffffffff"
OPACITY_0="0x0"
: ${XWININFO:=$(type -P xwininfo)}
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content