Skip to content

Instantly share code, notes, and snippets.

View borissov's full-sized avatar
🛰️
Occupy Mars.

Radoslav Borissov borissov

🛰️
Occupy Mars.
View GitHub Profile
@Fake51
Fake51 / gist:865603
Created March 11, 2011 08:04
Syntax check all .php files in folder and subfolder
find . -iname '*.php' -exec php -l '{}' \; | grep '^No syntax errors' -v | less
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
nmap Ж :
" yank
nmap Н Y
nmap з p
nmap ф a
nmap щ o
nmap г u
nmap З P
@kdankov
kdankov / MacVim URL scheme
Created April 7, 2013 14:18
Send a link to a local file, open in MacVim and move the cursor to a specific line and column.
mvim://open?url=file:///etc/hosts&line=1&column=2
@shawnbot
shawnbot / index.md
Last active August 23, 2023 10:18
Testing web pages with Xcode's iOS Simulator

Finding the Simulator

You can test with the iOS Simulator that comes with Xcode. Navigate to the Xcode app in the Finder, right click and select "Show Package Contents":

screen shot 2013-05-06 at 12 04 27 pm

Then navigate to Contents > Applications, and open the shortcut to "iPhone Simulator" (it may be called "iOS Simulator" depending on which version of Xcode you're running):

screen shot 2013-05-06 at 12 05 45 pm

# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@vratiu
vratiu / .bash_aliases
Last active July 8, 2024 07:27
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@mike0004
mike0004 / mac-realsleep.sh
Created October 12, 2015 12:07
Set mac power settings to prevent battery drain during sleep
# show pmsettings (see `man pmset` or http://bit.ly/1LDWm37)
pmset -g
# see what wakes up your host
syslog |grep -i "Wake reason"
# turn off sleep settings
sudo pmset ttyskeepawake 0
sudo pmset womp 0
sudo pmset powernap 0
@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active June 24, 2024 03:28
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose