Skip to content

Instantly share code, notes, and snippets.

View xlab's full-sized avatar
:octocat:
Hacking

Max Kupriianov xlab

:octocat:
Hacking
View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active October 26, 2024 13:55
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@bcse
bcse / build-ffmpeg.sh
Created August 22, 2011 17:01
Compile FFmpeg/Libav for iOS
# configure for armv7 build
./configure \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='/usr/local/bin/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--target-os=darwin \
--arch=arm \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7' \
--extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk' \
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@gburd
gburd / haproxy.conf
Last active July 5, 2022 13:34
Recommended haproxy settings to balance Riak protobuf and http interfaces (note: WORK IN PROGRESS)
# Documentation for HAProxy
# http://code.google.com/p/haproxy-docs/w/list
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
# NOTES:
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active September 24, 2024 14:52 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@xlab
xlab / lock.c
Created July 13, 2012 10:59
Touchscreen lock via tslib
#include "tslib/src/tslib.h"
struct tsdev *ts;
char *tsdevice = "/dev/input/event0";
ts = ts_open(tsdevice, 0);
int ts_tmpfd = ts_fd(ts);
if (ts_tmpfd == -1)
{
perror("ts_open");
@xlab
xlab / matchbox-keyboard-toggler.c
Created July 13, 2012 11:16
Matchbox Keyboard Toggler
/*
A very simple program to send the toggle-keyboard event to matchbox-keyboard
Requires a version of matchbox-keyboard running in daemon mode (-d), and
must be a version of matchbox-keyboard that supports the toggle event.
Currently the SVN version meets this requirement.
Compiling:
gcc matchbox-keyboard-toggler.c -o matchbox-keyboard-toggler -lX11
@xlab
xlab / mka.py
Created July 26, 2012 13:49
Matchbox keyboard applet, PyGTK
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
# Matchbox-keyboard Applet
# (C) 2009 Maxim Kouprianov <http://kc.vc>
import pygtk
pygtk.require('2.0')
import gtk
import os
@xlab
xlab / matchbox-window-manager-matan.diff
Created July 26, 2012 13:56
Enable movable dialogs (DIALOGMODE=free) in 'matchbox-window-manager'
diff -ur orig/matchbox-window-manager-1.2/src/dialog_client.c matchbox-window-manager-1.2/src/dialog_client.c
--- orig/matchbox-window-manager-1.2/src/dialog_client.c 2007-08-16 08:51:54.000000000 +0300
+++ matchbox-window-manager-1.2/src/dialog_client.c 2008-10-13 13:12:02.000000000 +0200
@@ -667,8 +667,8 @@
int bdr_south = 0, bdr_west = 0, bdr_east = 0, bdr_north = 0;
/* Check if we actually want to perform any sizing intervention */
- if (w->config->dialog_stratergy == WM_DIALOGS_STRATERGY_FREE)
- return;
+// if (w->config->dialog_stratergy == WM_DIALOGS_STRATERGY_FREE)
@rnapier
rnapier / fix-xcode
Last active October 31, 2024 13:54
Links Xcode SDKs from the /SDKs directory (which you maintain yourself)
#!/usr/bin/python
# fix-xcode
# Rob Napier <[email protected]>
# Script to link in all your old SDKs every time you upgrade Xcode
# Create a directory called /SDKs (or modify source_path).
# Under it, put all the platform directories:
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform
# Under those, store the SDKs: