Skip to content

Instantly share code, notes, and snippets.

View brownman's full-sized avatar

brownman brownman

  • self
  • israel
View GitHub Profile
@brownman
brownman / git_blame_yonatan.sh
Last active August 29, 2015 14:13
git_blame_yonatan.sh
yonatan_err ()
{
clear;
local pkgs='xsel cowsay xcowsay google-chrome-stable flite';
dpkg -S $pkgs &>/dev/null || ( sudo apt-get install $pkgs );
local file=/tmp/yonatan.err;
local cmd1='npm install -g';
local cmd2='npm link';
local cmd="$cmd1 && $cmd2";
cowsay 'interesting what yonatan is doing right now';
#!/usr/bin/env python
"""
Use byzanz to create a GIF screencast of a specific window.
Required tools:
sudo apt-get install byzanz x11-utils xdotool
A tip: use an extra-long duration (-d 100), record your shot, and use
gimp to shorten the duration of the last frame. You need to rename the layer
from "Frame 123 (100000 ms) (combine)" to "Frame 123 (1000 ms) (combine)".
@brownman
brownman / unity_desktop_keyboard_usb_fix.sh
Created January 14, 2015 13:33
mouse+keyboard not responding on first few clicks
#http://www.geekdevs.com/2010/04/solved-unable-to-enumerate-usb-device-disabling-ehci_hcd/
cd /sys/bus/pci/drivers/ehci_hcd/
sudo sh -c 'find ./ -name "0000:00:*" -print| sed "s/\.\///">unbind'
@brownman
brownman / xbmc_superrepo.sh
Created January 13, 2015 07:05
xbmc: auto-install: repository.superrepo.org
#arch-linux is great - it has scripts for everything !
#this is convertion of 1 script to work on Ubuntu
#based on:
#https://aur.archlinux.org/packages/?O=0&C=0&SeB=nd&K=xbmc&outdated=&SB=v&SO=d&PP=50&do_Search=Go
#https://aur.archlinux.org/packages/?O=0&C=0&SeB=nd&K=kodi&outdated=&SB=v&SO=d&PP=50&do_Search=Go
# Maintainer: M0Rf30
pkgname=kodi-addon-superrepo-all
pkgver=0.5.205
@brownman
brownman / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-leaderboard.html">
<link rel="import" href="../ace-element/ace-element.html">
@brownman
brownman / brightness_lenovo.py
Created September 22, 2014 12:41
brightness_lenovo.py
#!/usr/bin/python
#http://ideone.com/yPlo5
#http://askubuntu.com/questions/57236/unable-to-change-brightness-in-a-lenovo-laptop
# Brightness changer script for Linux systems that don't really support brightness.
# Created by Oleh 'BlaXpirit' Prypin.
# Tested with Python 2.7 and 3.2, but Python 3 is recommended.
@brownman
brownman / designer.html
Created August 23, 2014 12:29
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
#!/bin/bash
# Copyright (c) 2014-Present, Scott Cagno
# All rights reserved. [BSD License]
# ------------------------------------------
# THIS BASH SCRIPT UPLOADS A CORPUS FILE TO
# THE CMU ONLINE LANGUAGE MODELING GENERATOR.
# IT WILL RETURN AND STAGE THE GENERATED
# LANGUAGE MODEL AND DICTIONARY FILES IN THE
# SPECIFIED DIRECTORY (LANGDIR).
@brownman
brownman / gist:d2c2905fb24b8591a7cc
Last active August 29, 2015 14:02 — forked from cloudsben/gist:4490135
download_entire_website.sh
# -p parameter tells wget to include all files, including images.
# -e robots=off you don't want wget to obey by the robots.txt file
# -U mozilla as your browsers identity.
# --random-wait to let wget chose a random number of seconds to wait, avoid get into black list.
# Other Useful wget Parameters:
# --limit-rate=20k limits the rate at which it downloads files.
# -b continues wget after logging out.
# -o $HOME/wget_log.txt logs the output
wget --random-wait -r -p -e robots=off -U mozilla http://www.example.com