This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A quick and dirty implementation of an HTTP proxy server in Ruby | |
# because I did not want to install anything. | |
# | |
# Copyright (C) 2009 Torsten Becker <torsten.becker@gmail.com> | |
require 'optparse' | |
require 'socket' | |
require 'uri' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRelativePath($base = '/', $target = '/') | |
{ | |
$out = array(); | |
$base_ex = explode('/', $base); | |
$target_ex = explode('/', $target); | |
//Find common ancestor | |
$max = min(count($base_ex), count($target_ex)); | |
for($i = 0; $i < $max; $i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'shellwords' | |
$LAST_MOD_FILE = 'GDRIVE_SYNC_LAST_MOD' | |
# date "+%s" | |
$LAST_MOD = Time.at 0 | |
# Find the last modification time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ClearBitmapData(BitmapData bd, byte[] color) | |
{ | |
var pf = bd.PixelFormat; | |
var size = sizeof(byte); | |
if(pf == PixelFormat.Format16bppRgb555) | |
size *= 2; | |
else if(pf == PixelFormat.Format24bppRgb) | |
size *= 3; | |
else if (pf == PixelFormat.Format32bppArgb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Applet = imports.ui.applet; | |
const Gio = imports.gi.Gio; | |
const DBus = imports.dbus; | |
const Lang = imports.lang; | |
const St = imports.gi.St; | |
const PopupMenu = imports.ui.popupMenu; | |
const BUS_NAME = 'org.gnome.SettingsDaemon'; | |
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Power'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Kyle Keen <keenerd@gmail.com> | |
pkgname='solvespace-git' | |
pkgver=r795.1e2f199 | |
pkgrel=1 | |
pkgdesc="SOLVESPACE is a parametric 3d CAD program." | |
arch=('i686' 'x86_64') | |
url='http://solvespace.com/' | |
license=('GPL3') | |
depends=('libpng' 'json-c' 'glew' 'gtkmm') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Maxime Gauduin <alucryd@archlinux.org> | |
pkgname=rpcs3-git | |
pkgver=0.0.0.9.r262.b7eda71 | |
pkgrel=1 | |
pkgdesc='A Sony PlayStation 3 emulator' | |
arch=('x86_64') | |
url='https://github.com/DHrpcs3/rpcs3' | |
license=('GPL2') | |
depends=('boost-libs' 'gcc-libs' 'glew' 'glibc' 'libgl' 'libx11' 'openal' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='js/jquery.js'></script> | |
<script src='js/bicubicInterpolation.js'></script> <!-- https://github.com/sukhoi1/ie-bicubic-img-interpolation-plugin --> | |
<script type='text/javascript'> | |
$(function() { | |
var ua = window.navigator.userAgent; | |
var msie = ua.indexOf('MSIE '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import subprocess as sp | |
enc = 'UTF-8' | |
p = sp.Popen(['dialog', '--gauge', 'hello', '6', '75', '0'], stdin=sp.PIPE) | |
for i in range(0, 100): | |
p.stdin.write(bytes(str(i)+"\n", enc)) | |
p.stdin.flush() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
from gi.repository import GLib | |
i=0 | |
def func(obj): | |
global i | |
win.set_title("i: %d" % i) |
OlderNewer