Skip to content

Instantly share code, notes, and snippets.

View dmgl's full-sized avatar
🎯
Focusing

Galochkin D.D. dmgl

🎯
Focusing
  • Russia, Saint-Petersburg
View GitHub Profile
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@yoneken
yoneken / remove_CLI_tools.sh
Created August 7, 2012 11:03
Xcode Command Line Tools Uninstaller
# remove_CLI_tools.sh
# written by cocoanetics:http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
# modified by yoneken
#!/bin/sh
RECEIPT_FILE1=/var/db/receipts/com.apple.pkg.DevSDK.bom
RECEIPT_PLIST1=/var/db/receipts/com.apple.pkg.DevSDK.plist
RECEIPT_FILE2=/var/db/receipts/com.apple.pkg.clang.bom
RECEIPT_PLIST2=/var/db/receipts/com.apple.pkg.clang.plist
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@ruckus
ruckus / gist:3989311
Created October 31, 2012 19:36
tumblr theme with fixed footer
<!DOCTYPE html>
<!--
High Res Theme 1.1.9 -- 26 September 2012
(c) 2011-2012 Justin Ouellette, all rights reserved
http://highrestheme.tumblr.com/
-->
<html>
<head>
<title>{Title}{block:PostSummary} - {PostSummary}{/block:PostSummary}</title>
<meta name="tumblr-theme" content="30257" />
@jdkanani
jdkanani / Server.py
Last active April 25, 2023 16:40
Python SimpleHTTPServer : Routing sample
#!/usr/bin/env python
import os
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
ROUTES = [
('/', '/var/www/doc-html')
]
class MyHandler(SimpleHTTPRequestHandler):
@bobuk
bobuk / img.py
Last active March 31, 2024 22:58
Сегодня я вам покажу, как написать маленький скриптик, который умеет искать похожие фотографии. Зачем? Ну, если честно - совсем без причины.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Video of this screencast: https://vimeo.com/57296525
#
#
from __future__ import print_function, division, absolute_import
from PIL import Image as pImage
import numpy
@bobuk
bobuk / index.html
Created January 22, 2013 07:20
Это файлики для моего второго скринкаста. Они еще проще, чем первые. Подробности можно http://shrtdb.com:8432/
<html>
<head>
<title>Girls gone wild!</title>
<link rel="stylesheet" type="text/css" href="/static/style.css">
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="http://localhost:8080/application.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var jug = new Juggernaut;
jug.subscribe('babes', function (data) {
@knmkr
knmkr / get_all_photos_from_tumblr_likes.py
Last active July 9, 2018 11:38
Get all photos from my tumblr `likes`.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import urllib
from time import sleep
import pytumblr # https://github.com/tumblr/pytumblr
# set yours:
@shime
shime / _readme.md
Last active November 8, 2020 08:54 — forked from ryin/tmux_local_install.sh
installation script for tmux 1.9a

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc