Skip to content

Instantly share code, notes, and snippets.

View gornostal's full-sized avatar

Oleksandr Gornostal gornostal

  • Kyiv, UA
View GitHub Profile
@gornostal
gornostal / README.md
Last active June 7, 2019 16:20
Install Hackintosh OS X Yosemite on Sony Vaio VPC-F11M1R/H

Successfully installed OS X Yosemite on my Sony VAIO F11M1R/H.

Problems:

  • I had to buy USB sound card for $10 (Viewcon VE533 works for me), because I couldn't find audio drivers.
  • OS X won't connect to password protected Wi-Fi networks, so I had to remove a password.

So here's the steps that I followed:

  1. Make a bootable flash drive using UniBeast tool
@gornostal
gornostal / audible-mongolab.js
Created September 15, 2013 12:53
Tampermonkey script for audible collections in mongolab
// ==UserScript==
// @name Audible-Mongolab
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description https://gist.github.com/gornostal/6570516
// @match https://mongolab.com/databases/audible/collections/*
// @copyright 2012+, You
// ==/UserScript==
@gornostal
gornostal / audible.js
Last active December 23, 2015 02:59
Scrape audible search results
/**
* To run use http://nrabinowitz.github.com/pjscrape/
* 1. $ phantomjs pjscrape.js audible.js
* 2. Register on mongolab.com
* 3. $ mongoimport -h ds0466148.mongolab.com:45598 -d <dbname> -c <collection> -u <user> -p <password> --file audible.json --jsonArray
* 4. Install greasemonkey (Firefox) or tempermonkey (Chrome)
* 5. Add this userscript https://gist.github.com/gornostal/6570526
* 6. Open https://mongolab.com/databases/audible/collections/fiction_books or whatever you have
*/
@gornostal
gornostal / .bashrc
Created September 18, 2012 14:26
.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@gornostal
gornostal / cleanup.py
Created August 21, 2012 15:46
cleanup.py
#!/usr/bin/env python
import glob
import os
import sys
if len(sys.argv) < 2:
print "Usage: ./cleanup.py path/to/dir/ [max_dir_size_in_gb]"
sys.exit()
@gornostal
gornostal / duplicate_line.py
Created July 1, 2012 12:34
Sublime plugin for duplicating lines
import sublime, sublime_plugin
class DuplicateLineCommand(sublime_plugin.TextCommand):
def run(self, edit):
for region in self.view.sel():
if region.empty():
line = self.view.line(region)
line_contents = self.view.substr(line) + '\n'
self.view.insert(edit, line.begin(), line_contents)