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
callbench: callbench.o parse_vdso.o | |
musl-gcc -o $@ $? -lrt -static | |
sstrip $@ | |
%.o: %.c | |
musl-gcc -c $< -o $@ | |
clean: | |
rm *.o callbench |
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
% cat ~/Library/Preferences/IntelliJIdea14/codestyles/Tweet.xml | |
<code_scheme name="Tweet"> | |
<option name="LINE_SEPARATOR" value=" " /> | |
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" /> | |
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" /> | |
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND"> | |
<value /> | |
</option> | |
<option name="IMPORT_LAYOUT_TABLE"> | |
<value> |
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
localhost% for f in prepare run cleanup; do sysbench --test=fileio --file-test-mode=rndrw --max-time=60 --max-requests=0 --file-extra-flags=direct $f; done | |
sysbench 0.4.12: multi-threaded system evaluation benchmark | |
128 files, 16384Kb each, 2048Mb total | |
Creating files for the test... | |
sysbench 0.4.12: multi-threaded system evaluation benchmark | |
Running the test with following options: | |
Number of threads: 1 |
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
% cat ~/.mpv/config | |
fullscreen | |
hwdec=auto | |
vo=opengl-hq | |
af-add=scaletempo | |
af-add=drc | |
cache=102400 | |
cache-min=1 |
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
#define _FILE_OFFSET_BITS 64 | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> | |
#include <unistd.h> | |
#define N 16384 | |
int main() { | |
ssize_t r, counts[256] = {0}; | |
unsigned char buf[N]; |
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
# IPv4 address of eth0, assuming eth0 has only one IPv4 address.. | |
require 'ohai' | |
sys = ::Ohai::System.new | |
sys.all_plugins | |
node = sys.data | |
node['network']['interfaces']['eth0']['addresses'].find {|k,v| v['family'] == 'inet'}.first |
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 <xcb/xcb.h> | |
#include <stdio.h> | |
/* | |
gcc -o xcbtest xcbtest.c -lxcb | |
*/ | |
int main() { | |
int i = -1; | |
xcb_connection_t *c; |
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 qualified Data.Map as M | |
import XMonad | |
import qualified XMonad.StackSet as W | |
import XMonad.Actions.DynamicWorkspaces | |
import XMonad.Config.Kde | |
import XMonad.Hooks.SetWMName | |
import XMonad.Prompt |
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
package com.example; | |
class Hello { | |
// Simple example (unknown field name, namespace "com/example/Hello", id "noop") | |
@Logged | |
native void noop(int a); | |
// Complex example (known field names, namespace "com/example", id "fooed") | |
@Logged(id="fooed", namespace="com/example", fields=["from", "to"]) | |
void foo(@LogFormat(As.HASHCODE) Bar source, @LogFormat(As.IDENTITY) Baz dest); | |
} |
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
The remote desktop session has to be headless :( | |
- Install the deb (can convert with alien & co) | |
- Patch with modern_distro.diff (cherry-pick what your system needs) | |
- To support automatic desktop resizing: | |
- Works with any window manager | |
- Build Xvfb with xvfb-randr.diff | |
- Expose as /usr/bin/Xvfb-randr | |
- If replacing system-wide binary by repackaging, simply | |
# ln -sf Xvfb /usr/bin/Xvfb-randr |