Skip to content

Instantly share code, notes, and snippets.

View wingsuitist's full-sized avatar

Sam Felix wingsuitist

  • Basel
View GitHub Profile
#!/bin/bash
# print command in shell script and wait for confirmation before executing it
trap 'read -p "run: $BASH_COMMAND"' DEBUG
echo "do something interesting"
echo "do the next interesting thing"
@wingsuitist
wingsuitist / say-test-voices.sh
Last active December 3, 2019 20:50
Test english voices for say on OSX text to speech
# test all voices available on macos
for voice in `say -v "?"|grep en_|sed -e 's/^\([a-zA-Z]*\).*$/\1/g'`
do say -v $voice Hello I am $voice
done
brew install upx
go build -ldflags="-s -w"
upx $(basename $(pwd))
@wingsuitist
wingsuitist / gist:b713944adc08c878d033471703ed44c1
Last active July 15, 2018 18:01
git: : Angular 4 and testing: angular/cli + gitlab-ci + ng test + PhantomJS. Raw Raw
git remote add origin git@gitlab.com:XXyour_userXX/XXyour_projectXX.git
git add -A
git commit -m 'TDD from letsboot rocks!'
git push -u origin master
@wingsuitist
wingsuitist / .gitlab-ci.yml
Last active May 30, 2018 13:51
gitlab-ci.yml : Angular 4 and testing: angular/cli + gitlab-ci + ng test + PhantomJS. Raw Raw Raw
image: node:latest
cache:
paths:
- node_modules/
test_letslearn:
script:
- npm install
- ./node_modules/@angular/cli/bin/ng test --single-run=true --browsers PhantomJS --watch=false
@wingsuitist
wingsuitist / karma.conf.js
Created July 5, 2017 09:26
karma.conf.js: Angular 4 and testing: angular/cli + gitlab-ci + ng test + PhantomJS. Raw Raw
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
@wingsuitist
wingsuitist / tooloud.sh
Last active March 15, 2018 06:22
put this function in your .bash_profile
tooloud() {
messages=( "beep beep" "lower voice" "a bit to loud" "the puppies are sleeping" "you are waking up the kittens" "hello hello")
voices=( "Alex" "Daniel" "Serena" "Tessa" "Veena")
while true; do \
soundmeter --trigger +3000 4 --action stop
randomMessage=$[$RANDOM % ${#messages[@]}]
randomVoice=$[$RANDOM % ${#voices[@]}]
say -v ${voices[randomVoice]} ${messages[randomMessage]}
done
}
import { Kurs } from '@letsboot/angular';
@Component({
selector: 'Angular-Kurs-Zürich',
templateUrl: './smooth_material.html',
styleUrls: ['./great_trainers.css']
})
export class AngularKursComponent {
register(you: developer) {
this.participantsService.add(you);
@wingsuitist
wingsuitist / .gitlab-ci.yml
Last active November 17, 2017 02:32
gitlab-ci stage and prod separated
image: trion/ng-cli-karma
cache:
paths:
- node_modules/
deploy_stage:
stage: deploy
environment: Stage
only:
@wingsuitist
wingsuitist / package.json
Created October 28, 2017 09:54
package.json debug task with source env.sh
{
"name": "somenode-stuff",
"version": "1.0.0",
"description": "Some Node Stuff",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "source env.sh; nodemon dist/index.js",
"debug": "source env.sh; node --inspect-brk=9229 dist/index.js"
},