Skip to content

Instantly share code, notes, and snippets.

View samuelhauser's full-sized avatar

Samuel Hauser samuelhauser

  • Freelancer
  • Europe
View GitHub Profile
ab -n 100 -c 10 "https://keinundaber-website-stage.os4.drei.io/buecher?orderBy=releaseDate_DESC&programArea=1468"

This one command will uninstall all the packages install through Homebrew.

brew remove --force $(brew list) --ignore-dependencies

To remove unused archives run

brew cleanup

To remove Cask packages

$ npm install -g http-server
$ http-server Downloads -a localhost -p 8080

Starting up http-server, serving Downloads on port: 8080

Hit CTRL-C to stop the server

You can access the apollo clients in Nuxt Vuex via this. For instance:

export default {
  actions: {
    foo (context) {
      let client = this.app.apolloProvider.defaultClient
    }
}

Zertifikate auflisten

sudo certbot certificates

@samuelhauser
samuelhauser / index.js
Last active October 17, 2017 10:47
Get all possibilities from a given array.
let allArrays = [['a', 'b'], ['c'], ['d', 'e', 'f']];
const allPossibleCases = (arr) => {
if (arr.length === 1) {
return arr[0];
} else {
let result = [];
let allCasesOfRest = allPossibleCases(arr.slice(1)); // recur with the rest of array
for (let i = 0; i < allCasesOfRest.length; i++) {
for (let j = 0; j < arr[0].length; j++) {

Keybase proof

I hereby claim:

  • I am samuelhauser on github.
  • I am samuelhauser (https://keybase.io/samuelhauser) on keybase.
  • I have a public key ASCvGFLiRcBz0GHQExP1KMGzzRempLef1Zg1xd7IpqndOgo

To claim this, I am signing this object: