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"
brew install upx
go build -ldflags="-s -w"
upx $(basename $(pwd))
@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 / 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"
},
@wingsuitist
wingsuitist / launch.json
Created October 28, 2017 09:52
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch via NPM",
@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 / .gitlab-ci.yml
Last active August 23, 2017 12:47
gitlab ci with surge and angular
image: trion/ng-cli-karma
cache:
paths:
- node_modules/
deploy_stage:
stage: deploy
environment: Stage
only:
@wingsuitist
wingsuitist / 00-setup.sh
Last active August 22, 2017 15:17
letslearn-ci-cd plus1 example
# run this in the terminal
npm install -g @angular/cli
ng new letslearn --prefix lsl
cd letslearn
ng e2e
ng test --watch false
ng serve -o
@wingsuitist
wingsuitist / app.e2e-spec.ts
Last active July 7, 2017 14:37
angular 4 protractor end 2 end testing - e2e tests
import { LetslearnPage } from './app.po';
describe('letslearn App', () => {
let page: LetslearnPage;
beforeEach(() => {
page = new LetslearnPage();
});
it('Should display Letslearn title', () => {