| Language feature | Kotlin | Scala |
|---|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Exploration of a graphql client in Python | |
| """ | |
| import asyncio | |
| from dataclasses import dataclass | |
| from typing import Generator | |
| from gql import gql | |
| from gql.client import Client, AsyncClientSession | |
| from gql.transport.aiohttp import AIOHTTPTransport |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Remove contents of /usr/local/var/mysql | |
| brew uninstall mysql | |
| brew uninstall mariadb | |
| brew install mariadb | |
| mysql_install_db | |
| mysql.server start | |
| sudo mysql | |
| - this opens a session. Just exit mysql for now | |
| mysql_secure_installation | |
| - Answer yes to everything |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val hello="foo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #test | |
| adb-all() | |
| { | |
| adb devices | while read line | |
| do | |
| if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ] | |
| then | |
| device=`echo $line | awk '{print $1}'` | |
| echo "$device:" | |
| adb -s $device $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x=0 | |
| while [ 1 ] | |
| do | |
| x=`expr \( $x + 90 \) % 360 ` | |
| /Applications/Genymotion\ Shell.app/Contents/MacOS/genyshell -c "rotation setangle $x" | |
| sleep 1 | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf |
Summary of this site: https://samindaw.wordpress.com/2012/03/21/mounting-a-file-as-a-file-system-in-linux/
dd if=/dev/zero of=/path/to/big_file bs=1024 count=10000000
sudo losetup /dev/loop0 /path/to/big_file
sudo mkfs -t ext4 -m 1 -v /dev/loop0
mkdir /mnt/my_mount_point
sudo mount -t ext4 /dev/loop0 /mnt/my_mount_pointStart/stop:
systemctl restart docker
systemctl stop docker
systemctl start docker
systemctl daemon-reload (do this after changing docker config)
Config: /lib/systemd/system/docker.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gpg -c --cipher-algo AES256 --symmetric mysecretlife.doc |