Skip to content

Instantly share code, notes, and snippets.

echo -n 'func pl2303_startup +p' | sudo tee /sys/kernel/debug/dynamic_debug/control
# get current IP
$ip = (Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.InterfaceAlias -like 'ethernet*'}).IPAddress
$port = 3389
# get password or generate
$password = ''
if($env:appveyor_rdp_password) {
# take from environment variable
$password = $env:appveyor_rdp_password
@Rondom
Rondom / issues.md
Last active October 11, 2017 23:05

WiX Installer: Should ship .NET 4.6.x instead of 4.0

For Windows 7 does not come with .NET 4. For this reason, we ship a stub-installer with the installer.

While the situation that .NET is not installed is very uncommon and probably only happens when installing on a fresh Win7.

Change the shipped version from 4.0 to 4.6.

ideas

@Rondom
Rondom / gist:0a0c46d7a094959597bcecf7e29a7746
Created October 7, 2017 12:49
MingW-W64 64bit-warnings
/home/andreas/cvs/dumb/src/it/readpsm.c: In function ‘it_psm_process_pattern’:
/home/andreas/cvs/dumb/src/it/readpsm.c:488:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
pattern->n_entries = (int)((long)entry - (long)pattern->entry);
^
/home/andreas/cvs/dumb/src/it/readpsm.c:488:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
pattern->n_entries = (int)((long)entry - (long)pattern->entry);
^
[ 37%] Building C object CMakeFiles/dumb.dir/src/it/readoldpsm.c.obj
[ 38%] Building C object CMakeFiles/dumb.dir/src/it/readokt2.c.obj
[ 39%] Building C object CMakeFiles/dumb.dir/src/it/readokt.c.obj
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <lkl.h>
#include <lkl_host.h>
#include <time.h>
void *do_stuff(void *foo) {
// struct lkl_timespec time = {0, 5000000L};
// lkl_sys_nanosleep(&time, NULL);
@Rondom
Rondom / thread_test.c
Created July 22, 2016 12:58
./thread_test 200 201 25 # 200 MB memory, 201 times create 25 threads calling lkl_sys_getpid()
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <lkl.h>
#include <lkl_host.h>
#include <time.h>
void *do_stuff(void *foo) {
// struct lkl_timespec time = {0, 5000000L};
// lkl_sys_nanosleep(&time, NULL);
#ifdef _WIN32
#include <windows.h>
#else
#include <fcntl.h>
#endif
#include <stdio.h>
#include <string.h>
#include <errno.h>
dconf write /org/gnome/desktop/input-sources/xkb-options "['compose:caps']"
@Rondom
Rondom / disable_gnome_keyring.sh
Created November 21, 2015 02:14
disable gnome-keyrings ssh-agent and use stock ssh-agent
cp /etc/xdg/autostart/gnome-keyring-ssh.desktop ~/.config/autostart
echo 'X-GNOME-Autostart-enabled=false' >> ~/.config/autostart/gnome-keyring-ssh.desktop
echo Now run OpenSSH ssh-agent using systemd https://wiki.archlinux.org/index.php/SSH_keys#Start_ssh-agent_with_systemd_user
@Rondom
Rondom / clionrunner.sh
Last active November 4, 2015 14:45
Downloads clion to /tmp and extracts it. Can be used to circumwent tight disk quotas in home-dirs
#!/bin/bash
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )"
WORKDIR="$SCRIPTDIR/files"
TARURL="https://download.jetbrains.com/cpp/clion-1.2.tar.gz"
HASHURL="${TARURL}.sha256"
TARPATH="$WORKDIR/clion.tar.gz"
EXTRACTDIR="$WORKDIR"
if [ ! -d "$WORKDIR" ]; then
rm "$WORKDIR"