Skip to content

Instantly share code, notes, and snippets.

View ur4ltz's full-sized avatar

Andy Shevchenko ur4ltz

  • Kharkiv - Ukraine, Glory to Ukraine
View GitHub Profile
@ap
ap / httpd-cgit.conf
Created March 31, 2009 12:22
cgit clean URLs Apache config
# cgit setup for Apache that results in completely clean URLs, ie.
# visiting http://git.example.org/ will produce the cgit index page
<VirtualHost *>
# this part is stand fare
ServerName git.example.org
DocumentRoot /var/www/htdocs/cgit/
<Directory "/var/www/htdocs/cgit/">
AllowOverride None
Options ExecCGI
Order allow,deny
require("json");
require("socket.http")
require("socket.url")
function babelfish(lang, query)
lang = lang or "en"
query = query or ""
if lang == "en" or query == "" then
return query
@technoweenie
technoweenie / github_oauth_busy_developer_guide.md
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
@zdxerr
zdxerr / SciTEUser.properties
Created December 14, 2010 13:41
SciTE User Properties File
position.height=990
position.width=850
split.vertical=0
tabbar.multiline=1
toolbar.visible=1
statusbar.visible=1
@stefanfoulis
stefanfoulis / findauthors.sh
Created April 8, 2011 12:37
How to sync svn to git
#!/usr/bin/env bash
# Run this script inside a SVN checkout of the project
authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq)
for author in ${authors}; do
echo "${author} = NAME <USER@DOMAIN>";
@jseabold
jseabold / translate.py
Created December 13, 2011 18:58
Use Google Translate API from Python
# -*- coding: utf-8 -*-
"""
You need to fill in your API key from google below. Note that querying
supported languages is not implemented.
Language Code
-------- ----
Afrikaans af
Albanian sq
Arabic ar
@pqlaz
pqlaz / pin_change_interrupt_atmega168.c
Last active March 10, 2023 22:19
Пример использования прерывания по изменению состояния входа
// Пример использования прерывания по изменению состояния входа
// avr-gcc, arduino nano AtMega168
#include <avr/interrupt.h>
#include <avr/io.h>
#define IN_PIN _BV(3) // button pin B3 (arduino nano - D11)
#define LED _BV(5) // arduino LED
@jcaraballo
jcaraballo / git-branch-between-different-repositories.md
Created March 6, 2012 01:05
How to fork a github repository in bitbucket

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
@perky
perky / ProFi.lua
Created May 30, 2012 20:32
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark