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
# Given a sum, it returns prime numbers that approximately add up to the sum. | |
# Example: 100 -> [29, 31, 37] (sums to 97) | |
require 'prime' | |
def find_prime_triple(target) | |
return [2, 3, 5] if target <= 4 | |
middle_prime = nil | |
i = 0 | |
while !middle_prime do |
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 | |
# | |
# Needs to be run as root! | |
# between 0 (never flakey) and 100 (regularly flaky) | |
flakiness=20 | |
# max delay in seconds | |
max_delay_normal=8 | |
max_delay_flakey=300 |
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
/** | |
* Snippet for exporting and importing IndexedDB databases. | |
* Intended to be used only for testing. | |
* | |
* It uses only the native IndexedDB API, so it should work by copy-pasting the code | |
* into the browser devtools. | |
* | |
* Exporting: | |
* const json = await exportToJson('foo-db'); | |
* // ("json" is a string and can be copied around) |
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
pkgname=zapcc-git | |
pkgver=r57.9bd04e761 | |
pkgrel=1 | |
pkgdesc="caching C++ compiler based on clang, designed to perform faster compilations" | |
arch=('x86_64') | |
license=('custom:University of Illinois/NCSA Open Source License') | |
url="https://www.zapcc.com/" | |
provides=('zapcc') | |
conflicts=('zapcc') | |
depends=('ncurses' 'zlib') |
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
# To build: | |
# $ docker build -t aur-cliqz . | |
# | |
# To run (experimental): | |
# $ xhost +local: | |
# $ export XSOCK=/tmp/.X11-unix/X0 | |
# $ docker run --rm -v $XSOCK:$XSOCK aur-cliqz cliqz | |
# | |
# To remove local X11 permissions again: | |
# $ xhost - |
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
# Maintainer: Anatol Pomozov <anatol dot pomozov at gmail> | |
# Contributor: Jose Neder <jlneder(at)gmail(dot)com> | |
pkgname=libhugetlbfs | |
pkgver=2.20 | |
pkgrel=1 | |
pkgdesc='interacts with the Linux hugetlbfs to make large pages available to applications in a transparent manner.' | |
url='https://github.com/libhugetlbfs/libhugetlbfs' | |
arch=(i686 x86_64) | |
depends=(perl) |
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
# Run with: | |
# | |
# sudo docker build . -t latest-cliqz-release && sudo docker run --rm -it latest-cliqz-release | |
# | |
# In the end, you should see output like this: | |
# | |
# Searching for latest CLIQZ release on Ubuntu (this can take a while...) | |
# http://repository.cliqz.com/dist/debian-release/pool/main/c/cliqz/CLIQZ-1.13.2-release.20170508130652.x86_64.deb | |
# SHA256: 73f63d37c786e795ef0387095d80d2aaf10bb273916e2a262968306e3f6161cb | |
# |