Skip to content

Instantly share code, notes, and snippets.

View kelunik's full-sized avatar

Niklas Keller kelunik

View GitHub Profile
@BenMorel
BenMorel / .travis.install-mysql-5.7.sh
Last active December 6, 2019 06:24
Install MySQL 5.7 on Travis-CI
sudo apt-get remove --purge "^mysql.*"
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
sudo rm -rf /var/log/mysql
echo mysql-apt-config mysql-apt-config/enable-repo select mysql-5.7-dmr | sudo debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb
sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb
sudo apt-get update -q
sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server
@finalfantasia
finalfantasia / improving_text_antialiasing_and_gui_performance_in_intellij_idea_on_openjdk_8.md
Last active April 23, 2024 12:11
Improving Text Anti-aliasing and GUI Performance in IntelliJ IDEA on OpenJDK 8

This is a list of tweaks to make IntelliJ IDEA work better with OpenJDK 8. Refer to System Properties for Java 2D Technology for the details of the options used below.

Note that the performance boost achieved via the OpenGL-based hardware acceleration pipeline is made possible by using the open-source Radeon driver (for AMD graphics cards) included in the latest stable version (10.3.3 as of now) of the Mesa 3D Graphics Library available in the official Fedora 21 stable repository. Therefore, the gained performance boost might vary based on the types of graphics cards and the versions of the drivers used in your system.

  1. Fixing Text Anti-aliasing in Fedora (Ubuntu users may skip this step.)
  2. Fixing text anti-aliasing in IntelliJ IDEA

In $IDEA_HOME/bin/idea64.vmoptions (or $IDEA_HOME/bin/idea.vmoptions on a x86 architecture), change

@prurigro
prurigro / archroot.sh
Last active June 17, 2021 22:31
An overlayfs-based chroot management script for deployable arch build environments
#!/usr/bin/env bash
#
# archroot
# An overlayfs chroot management script for deployable arch build environments
#
# Version 1.18
#
# Written by Kevin MacMartin
# Released under the MIT license
@Thinkscape
Thinkscape / flattenExceptionBacktrace.php
Last active December 28, 2023 12:28
Make any PHP Exception serializable by flattening complex values in backtrace.
<?php
function flattenExceptionBacktrace(\Exception $exception) {
$traceProperty = (new \ReflectionClass('Exception'))->getProperty('trace');
$traceProperty->setAccessible(true);
$flatten = function(&$value, $key) {
if ($value instanceof \Closure) {
$closureReflection = new \ReflectionFunction($value);
$value = sprintf(
'(Closure at %s:%s)',
@kelunik
kelunik / setup.sh
Last active March 10, 2016 11:32
X1C Install
#!/bin/bash
# re-run as root if necessary
if [[ $EUID -ne 0 ]]; then
sudo ./$0
exit
fi
# apt-get install -y acpi
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
@codesnik
codesnik / empty-maxmind-db-writer.pl
Created December 27, 2015 02:48
it creates 'empty.mmdb', empty MaxMind geoip database, good enough for your tests
#!/usr/local/bin/perl
# run 'mcpan MaxMind::DB::Writer' beforehand
use MaxMind::DB::Writer::Tree;
use Net::Works::Network;
my %types = (
#color => 'utf8_string',
#dogs => [ 'array', 'utf8_string' ],
#size => 'uint16',
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@NickCraver
NickCraver / BotLovin.cs
Last active January 5, 2023 11:36
Some bot/crawler fun on Stack Overflow. 10 hours of fun, to be precise.
private static readonly string[] tenHoursOfFun =
{
"https://www.youtube.com/watch?v=wbby9coDRCk",
"https://www.youtube.com/watch?v=nb2evY0kmpQ",
"https://www.youtube.com/watch?v=eh7lp9umG2I",
"https://www.youtube.com/watch?v=z9Uz1icjwrM",
"https://www.youtube.com/watch?v=Sagg08DrO5U",
"https://www.youtube.com/watch?v=5XmjJvJTyx0",
"https://www.youtube.com/watch?v=IkdmOVejUlI",
"https://www.youtube.com/watch?v=jScuYd3_xdQ",
@DaveRandom
DaveRandom / .gitignore
Created August 2, 2016 10:07
Default repository layout - PHP web application
vendor # ignore composer data
# ignore PHP Storm config
# you may want to ignore your IDE config and you may want to commit it, up to you
.idea