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
// compile with `gcc -I/usr/include getxkblayout.c -lX11 -lxkbfile` | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <X11/XKBlib.h> | |
#include <X11/extensions/XKBrules.h> | |
int main(int argc, char **argv) { | |
Display *dpy = XOpenDisplay(NULL); |
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 <stdio.h> | |
#include <sys/ptrace.h> | |
#include <sys/reg.h> | |
#include <sys/wait.h> | |
#include <unistd.h> | |
int main() { | |
int status; | |
pid_t child_pid = fork(); |
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 -x | |
BACKUP_DIR="$HOME/.dotfiles-backup" | |
[ -d $HOME/.dotfiles ] || git clone --bare https://github.com/fikovnik/dot-files.git $HOME/.dotfiles | |
function config { | |
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ | |
} |
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
(defun org-insert-clipboard-image () | |
(interactive) | |
(setq dir (concat (file-name-directory (buffer-file-name)) "resources")) | |
(unless (file-directory-p dir) (make-directory dir)) | |
(setq filename | |
(concat dir | |
"/" | |
(file-name-nondirectory (file-name-sans-extension (buffer-file-name))) | |
"-" | |
(format-time-string "%Y%m%d-%H%M%S") |
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
configurations { | |
mavenEmbedder | |
} | |
dependencies { | |
compile "org.apache.maven:maven-core:$mavenVersion" | |
compile "org.apache.maven:maven-plugin-api:$mavenVersion" | |
compile 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.4' | |
mavenEmbedder "org.apache.maven:maven-embedder:$mavenVersion" |
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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
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
"************************************************************************** | |
* Allowable characters: * | |
* - a-z * | |
* - A-Z * | |
* - 0-9 * | |
* - .+/\*~<>@%|&? * | |
* - blank, tab, cr, ff, lf * | |
* * | |
* Variables: * | |
* - variables must be declared before use * |
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 | |
export CXXFLAGS="-O2 -ggdb3" | |
export CPPFLAGS="-O2 -ggdb3" | |
export CFLAGS="-O2 -ggdb3" | |
export R_KEEP_PKG_SOURCE=yes | |
export CXX="g++" | |
./configure --with-blas --with-lapack --without-ICU --with-x \ | |
--with-tcltk --without-aqua --with-recommended-packages \ |
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 | |
export CXXFLAGS="-O0 -ggdb3" | |
export CPPFLAGS="-O0 -ggdb3" | |
export CFLAGS="-O0 -ggdb3" | |
export R_KEEP_PKG_SOURCE=yes | |
export CXX="g++" | |
./configure --with-blas --with-lapack --without-ICU --with-x \ | |
--with-tcltk --without-aqua --with-recommended-packages \ |
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
task syncMavenRepository(type: JavaExec) { | |
classpath = configurations.mavenEmbedder | |
main = 'org.apache.maven.cli.MavenCli' | |
systemProperties['maven.multiModuleProjectDirectory'] = projectDir | |
args = [ | |
'--errors', | |
'--batch-mode', | |
'--settings', '../config/repo-settings.xml', | |
'--file', "${buildDir}/pom.xml", | |
"org.apache.maven.plugins:maven-dependency-plugin:2.10:go-offline" |
NewerOlder