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
| Monoid | |
| empty | |
| concat | |
| append | |
| Functor | |
| map: (a -> b) -> f a -> f b | |
| Monad | |
| unit |
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
| SortedMap.iterableFactory should be Seq instead of Iterable | |
| Add implicits for IterableFactory objects | |
| MapView.values is not lazy |
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
| # Version 1. Unsafe C Style | |
| $cp = [System.CodeDom.Compiler.CompilerParameters]::new() | |
| $cp.CompilerOptions = '/unsafe' | |
| $Display = Add-Type -TypeDefinition @' | |
| using System; | |
| using System.Runtime.InteropServices; | |
| public unsafe class Display | |
| { | |
| [DllImport("User32.dll")] | |
| public static extern bool EnumDisplaySettings( |
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
| ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mp4 |
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
| def permutationRecursion(a: List[Int]) = { | |
| import scala.collection.mutable | |
| val results = mutable.ListBuffer[List[Int]]() | |
| def p(curr: List[Int], remaining: List[Int]): Unit = { | |
| if (remaining.isEmpty) { | |
| results += curr | |
| } | |
| else { | |
| for (i <- remaining) { |
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
| #!/bin/sh | |
| # Pump | |
| sudo pmset -a disablesleep 1 | |
| sudo pmset -a sleep 0 | |
| caffeinate -di | |
| #Sleep | |
| kill `ps -ef | grep caffeinate | grep -v grep | awk '{print $3}'` | |
| sudo pmset -a disablesleep 0 |
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
| In /etc/ssh/sshd_config | |
| IPQoS cs0 cs0 | |
| In /etc/fstab | |
| UUID=XXXX /media/pi/Data auto rw,user,auto 0 0 | |
| ``` | |
| sudo setfacl -b /media/pi |
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
| EXECFILE="$(readlink "$0" || echo "$0")" | |
| EXECPATH="$( cd -- "$(dirname "$EXECFILE")" >/dev/null 2>&1 ; pwd -P )" | |
| cd "$EXECPATH" |
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
| inside: | |
| ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist |
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
| awk 'NR==FNR{a[$0]=1;next}!a[$0]' B A | |
| # or better memory usage: | |
| awk 'NR==FNR{a[$0];next} !($0 in a)' B A | |
| grep -Fvx -f B.txt A.txt |