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
# forwarding exit status | |
(exit 127) | echo foo; (exit ${PIPESTATUS[0]}); echo $? |
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
# VirtualBox port forwarding example (localhost:2222 -> vm:22) | |
VBoxManage setextradata $VMNAME "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP | |
VBoxManage setextradata $VMNAME "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22 | |
VBoxManage setextradata $VMNAME "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222 | |
# or e1000 if that's the virtual nic we're using | |
VBoxManage setextradata $VMNAME "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/Protocol" TCP | |
VBoxManage setextradata $VMNAME "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/HostPort" 2222 | |
VBoxManage setextradata $VMNAME "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/GuestPort" 22 |
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
#!/bin/sh | |
# 初期設定 | |
WORK=$HOME/Builds/GCC | |
PREFIX=$HOME/mingw | |
export PATH="$HOME/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" | |
# ソースコードのダウンロード | |
if [ ! -d $WORK/src ] ; then | |
mkdir src |
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
! this did it, cmd is now working as Meta in Conkeror *and* Emacs | |
clear mod1 | |
clear mod2 | |
add mod4 = Meta_L |
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
#!/bin/bash | |
# | |
# Create a RAM Disk in Mac OS X 10.5, 10.6, 10.7 or later. | |
# To remove the RAM disk, simply eject it from the desktop | |
# as you would any other disk. | |
# | |
# http://osxdaily.com/2007/03/23/create-a-ram-disk-in-mac-os-x/ | |
if [ -z "$1" ]; then | |
echo Usage: $0 SIZE_IN_MB |
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
alias focus="sudo sh -c \"echo '127.0.0.1 www.facebook.com twitter.com mail.google.com # aab6de513ab5de9359809f3cdb62d352' >> /etc/hosts\"" | |
alias unfocus='sudo sed -i "" "/aab6de513ab5de9359809f3cdb62d352/d" /etc/hosts' |
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
/* | |
* GStreamer GLES2 Raspberry Pi example | |
* Based on http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gl/generic/cube/main.cpp | |
* Modified for Raspberry Pi/GLES2 by Arnaud Loonstra <arnaud@sphaero.org> | |
* Orginal by Julien Isorce <julien.isorce@gmail.com> | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Library General Public | |
* License as published by the Free Software Foundation; either | |
* version 2 of the License, or (at your option) any later version. |
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
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
# Enable the 2D Dock | |
defaults write com.apple.dock no-glass -bool true | |
# Make Dock icons of hidden applications translucent | |
defaults write com.apple.dock showhidden -bool true | |
# Disable menu bar transparency |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_opengl.h> | |
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
// | |
// main.m | |
// ProtectTest | |
// Demonstrates newer versions of iOS now support PROT_EXEC pages, for just-in-time compilation. | |
// | |
// Must be compiled with Thumb disabled | |
// | |
// Created by Stuart Carnie on 3/4/11. | |
// Copyright 2011 Manomio LLC. All rights reserved. | |
// |
OlderNewer