Skip to content

Instantly share code, notes, and snippets.

View wendigo's full-sized avatar
🧭
Time isn't slowing, just speed, it's all we're knowing

Mateusz "Serafin" Gajewski wendigo

🧭
Time isn't slowing, just speed, it's all we're knowing
View GitHub Profile
@druminski
druminski / Readme.md
Last active July 4, 2022 01:11
BigCache service example with external benchmarks

Cache service example. It uses fasthttp as an http server and bigcache as the cache.

External benchmarks are provided.

Running cache service

go run main.go

Server listens on 8080 port.

@Kornel
Kornel / recursive-cowsay.sh
Last active February 4, 2016 14:18
Recursive cowsay inception - random cow at every step
#!/usr/bin/env bash
COWS_PATH="/usr/local/share/cows"
COW_FILES=($(ls $COWS_PATH))
COWS=${#COW_FILES[@]}
rand_cow() {
#RAND_IDX=$(($RANDOM % $COWS))
RAND_IDX=$((`od -vAn -N4 -tu4 < /dev/urandom` % $COWS))
@robertsdionne
robertsdionne / deepdream-install.md
Last active February 15, 2021 16:07
Deepdream installation
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
/**
* Written by Gil Tene of Azul Systems, and released to the public domain,
* as explained at http://creativecommons.org/publicdomain/zero/1.0/
*/
package org.HdrHistogram;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.concurrent.locks.ReentrantLock;
@mmennis
mmennis / cpu_gauge.scala
Created August 28, 2012 16:24
Yammer metrics CPU guage
import com.yammer.metrics.Metrics
import com.yammer.metrics.core.{Gauge, MetricName}
import management.{RuntimeMXBean, ManagementFactory}
import com.sun.management.UnixOperatingSystemMXBean
class PercentCpuGauge extends Gauge[Double] {
val runBean: RuntimeMXBean = ManagementFactory.getRuntimeMXBean
val osBean: UnixOperatingSystemMXBean = ManagementFactory.getOperatingSystemMXBean.asInstanceOf[UnixOperatingSystemMXBean]
@johntyree
johntyree / getBlockLists.sh
Last active June 4, 2024 12:30
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'