Skip to content

Instantly share code, notes, and snippets.

@sliekens
sliekens / target.xml
Created January 25, 2016 08:28
A list of all <Target /> tags that ship with MSBuild / Visual Studio
C:\Program Files (x86)\MSBuild\12.0\Bin\Microsoft.Common.CurrentVersion.targets
<Target Name="_CheckForInvalidConfigurationAndPlatform"></Target>
<Target Name="Build" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="$(TargetPath)" />
<Target Name="BeforeBuild" />
<Target Name="AfterBuild" />
<Target Name="CoreBuild" DependsOnTargets="$(CoreBuildDependsOn)"></Target>
<Target Name="Rebuild" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(RebuildDependsOn)" Returns="$(TargetPath)" />
<Target Name="BeforeRebuild" />
<Target Name="AfterRebuild" />
<Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" />
# prepare
$ sudo apt-get install -y linux-headers-generic build-essential dkms
# get the right ISO from http://download.virtualbox.org/virtualbox/
$ wget http://download.virtualbox.org/virtualbox/5.2.8/VBoxGuestAdditions_5.2.8.iso
# create a mount folder
$ sudo mkdir /media/VBoxGuestAdditions
# mount the ISO
$ sudo mount -o loop,ro VBoxGuestAdditions_5.2.8.iso /media/VBoxGuestAdditions
# install the guest additions
@johan-bjareholt
johan-bjareholt / Speech recognition
Created December 8, 2015 15:54
Speech recognition on linux using Google Speech API
#!/bin/bash
# Record from mic
arecord -d 3 -f cd -t wav -r 16000 -c 1 -D pulse test.wav
# Get record volume
sox test.wav -n stats -s 16 2>&1 | grep 'Max level' | awk '{print $3}'
# Convert to flac for smaller footprint
flac -f test.wav
# Google speech recognition
LANG=en-us
@theshadowx
theshadowx / QtNaCl_docker.sh
Last active January 10, 2019 02:37
Qt/Qml With Chrome Native Client (NaCl) for docker
#!/bin/bash
# Install NaCl
wget http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
unzip nacl_sdk.zip
rm nacl_sdk.zip
nacl_sdk/naclsdk list
# get the latest stable bender
nacl_sdk/naclsdk update
pepperDir=$(find ./nacl_sdk -maxdepth 1 -type d -printf "%f\n" | grep 'pepper')
@theshadowx
theshadowx / QtNaCl.sh
Last active September 24, 2021 17:35
Qt/Qml With Chrome Native Client (NaCl)
#!/bin/bash
set -e
# Install NaCl
wget http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
unzip nacl_sdk.zip
rm nacl_sdk.zip
nacl_sdk/naclsdk list
@samhocevar
samhocevar / gist:00eec26d9e9988d080ac
Last active October 17, 2024 17:02
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <[email protected]>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@rom1mouret
rom1mouret / pipeline2-tts-config.asciidoc
Last active June 26, 2018 06:11
Daisy Pipeline 2 TTS Configuration

TTS configuration

Minimal Requirements

The audio encoder Lame must be installed. Lame’s location must be in the system PATH (i.e. $PATH on Unix, %PATH% on Windows), unless it is provided via the 'lame.path' system property.

In addition, one of the following text-to-speech processors must be installed:

For Unix users,

  • Acapela;

@lirenlin
lirenlin / gist:9760208
Last active March 10, 2020 08:46
list function in static library or object file
linux:
nm libelf.a | grep symbol
nm xxx.o | grep symbol
win32:
dumpbin/exports libelf.lib | grep symbol
dumpbin/symbols xxx.obj | grep symbol
dumpbin/symbols xxx.exe | grep symbol
dumpbin/all
@jvranish
jvranish / stack_traces.c
Last active April 19, 2025 03:39
An example of catching exceptions and printing stack traces in C on Windows, Linux and OS X
/* compile with:
on linux: gcc -g stack_traces.c
on OS X: gcc -g -fno-pie stack_traces.c
on windows: gcc -g stack_traces.c -limagehlp
*/
#include <signal.h>
#include <stdio.h>
#include <assert.h>
@Fat-Zer
Fat-Zer / autotools-cmake-convert.pl
Last active March 29, 2020 02:51
autotools-cmake-convert.pl
#!/usr/bin/env perl
# Usage sample:
# find <dir> -iname Makefile.am | while read m; do
# echo "=== processing $m ===";
# ../scripts/autotools-cmake-convert.pl ${m} >"$(dirname $m)/CMakeLists.txt";
# done
use v5.10.1;
use experimental qw(smartmatch);
use File::Basename;