This file contains 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/bash | |
# Install sleepwatcher | |
cd /tmp | |
curl -O http://www.bernhard-baehr.de/sleepwatcher_2.2.tgz | |
tar -zxvf sleepwatcher_2.2.tgz | |
cd sleepwatcher_2.2 | |
sudo mkdir -p /usr/local/sbin /usr/local/share/man/man8 | |
sudo cp sleepwatcher /usr/local/sbin | |
sudo cp sleepwatcher.8 /usr/local/share/man/man8 | |
sudo cp config/de.bernhard-baehr.sleepwatcher-20compatibility.plist /Library/LaunchAgents |
This file contains 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
defmodule BitString.Example do | |
import BitString | |
defbitstring data_frame do | |
_ :: 1 | |
stream_id :: 31 | |
flags :: 8 | |
length :: 24 | |
_ :: 1 | |
_ :: 7 |
This file contains 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
/* | |
Copyright 2018 Viktor Klang | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains 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
import java.util.concurrent.ConcurrentLinkedQueue | |
import java.util.concurrent.atomic.AtomicInteger | |
import scala.concurrent.ExecutionContext | |
import scala.util.control.NonFatal | |
import scala.annotation.tailrec | |
//inspired by https://gist.github.com/viktorklang/4552423 | |
object ThrottledExecutionContext { | |
def apply(maxConcurrents: Int)(implicit context: ExecutionContext): ExecutionContext = { |
This file contains 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
(function(){ | |
var i = 0; | |
var count = $('.Album.unavailable,.Album.preview').length; | |
console.log('Found ' + count + ' albums to remove'); | |
var timeout = 0; | |
$('.Album.unavailable,.Album.preview').each(function(){ | |
var instance_i = i++; | |
var album = $(this); | |
album.trigger('mouseover').mouseenter(); | |
album.find('a,div,span,image').trigger('mouseover').mouseenter(); |