Instantly share code, notes, and snippets.

View never.gif
![never](https://github.engineering.zhaw.ch/storage/user/2276/files/1f1c2780-5c62-11e9-85c9-07ae6857dcd8)
View appveyor.yml
init:
- ps: Start-BitsTransfer -Source "https://cdn.azul.com/zulu/bin/zulu11.29.11-ca-jdk11.0.2-win_x64.msi" -Destination "C:\Users\appveyor\Downloads\zulu11.29.11-ca-jdk11.0.2-win_x64.msi"
- ps: Start-Process "msiexec" "/i `"C:\Users\appveyor\Downloads\zulu11.29.11-ca-jdk11.0.2-win_x64.msi`" /quiet /norestart" -Wait
- ps: $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
View p01.c
#include "utils_ctboard.h"
#include "reg_ctboard.h"
#define S0 0x60000200
#define LED0 0x60000100
#define ROTARY 0x60000211
#define DISPLAY 0x60000110
int main(void) {
/* initializations go here */
View gist:96d5cbcebdd32c563eeb6f8808b7f250
Fabian Programmierung, Python, Basic Web, Desktop
Aaron Web
Peter Web, Bootstrap, PHP
Roberto Testing, Design, Web
Luca Java, Backend, Basic Web
Flavian Java, Basic Web, PL
Catan
Raumvermessung
Kreditkartenverwaltung
View matlab-cheatsheet.md

Matlab Cheatsheet

doc Öffnet Dokumentation

doc <command> Öffnet Dokumentation zu command

Vektoren

Indizes beginnen bei 1

Zeilenvektor

a = [1 2 3]

View ms_sqlserver.md

Use MS_SQL_SERVER on MacOS with Docker

Download MS_SQL Docker Image

docker pull microsoft/mssql-server-linux:2017-latest

Create MS_SQL Docker Image

docker run -d --name ms_sqlserver -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=P@55w0rd' -e 'MSSQL_PID=Developer' -p 1433:1433 microsoft/mssql-server-linux:2017-latest

Start and Stop Docker Container

View TodoListRepository.java
public class TodoListRepository {
public Observable<List<Todo>> findTodosForToday(String userId) {
return findAllByUser(userId)
.flattenAsObservable(todoLists -> todoLists)
.flatMap(todoList -> findTodosForTodayByTodoList(todoList.getId()).toObservable());
}
public Single<List<Todo>> findTodosForTodayByTodoList(UUID listId) {
return Single.create(emitter -> this.firestore.collection(COLLECTION_TODO_LISTS)
.document(listId.toString())
View backup.php
<?php
ini_set('max_execution_time', -1);
ini_set('memory_limit', '-1');
ini_set('display_errors', 1);
error_reporting(E_ALL);
$source = '<directory>';
$destination = 'backup.zip';
$result = zip($source, $destination);
View wpa_supplicant.conf
country=CH
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
# Generate NTLM password hash with: echo -n plaintext_password_here | iconv -t utf16le | openssl md4
# LAN - IEEE8021X authentication
#network={
# key_mgmt=IEEE8021X
# identity="<username>@zhaw.ch"