Skip to content

Instantly share code, notes, and snippets.

@abtris
abtris / update.secondary-php.sh
Created April 6, 2013 06:07
Gitolite hooks to check php syntax, with xml and git-notify to jenkins
#!/bin/bash
NOBOLD="\033[0m"
BOLD="\033[1m"
BLACK="\033[30m"
GREY="\033[0m"
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
BLUE="\033[34m"
@vincentbernat
vincentbernat / pinba.sql.H_engine-05.adm.dailymotion.com
Created November 7, 2013 13:34
Non default Pinba SQL tables
CREATE TABLE IF NOT EXISTS `tag_info_counter` (
`tag_value` varchar(32) DEFAULT NULL,
`req_count` int(11) DEFAULT NULL,
`req_per_sec` float DEFAULT NULL,
`hit_count` int(11) DEFAULT NULL,
`hit_per_sec` float DEFAULT NULL,
`timer_value` float DEFAULT NULL
) ENGINE=PINBA COMMENT='tag_info:counter';
CREATE TABLE IF NOT EXISTS `tag_info_group` (
@whitfin
whitfin / LinkMovementMethod.java
Created January 28, 2014 21:09
Custom Link Movement to open any clicked links inside an inline browser. Requires either a custom inline browser, or the one I created in a gist.
package com.zackehh.example;
import com.zackehh.example.MinimalBrowser;
import android.content.Context;
import android.content.Intent;
import android.text.Layout;
import android.text.Spannable;
import android.text.method.MovementMethod;
import android.text.style.URLSpan;
@hmmdeif
hmmdeif / solar_farm_sun_finder.cs
Last active August 9, 2023 11:04
Space Engineers script to rotate a main solar panel to check for the rotation of the sun. Once the output is high enough, the rotors will stop spinning until the max output falls below the threshold.
void Main(string argument)
{
List<IMyTerminalBlock> solarRotors = new List<IMyTerminalBlock>();
IMySolarPanel mainSolarPanel = GridTerminalSystem.GetBlockWithName("Main Solar Panel Optimised") as IMySolarPanel;
int currentPower = GetPanelPower(mainSolarPanel);
GridTerminalSystem.SearchBlocksOfName("Solar Rotor", solarRotors);
if (currentPower <= 100) {
RotateSolarRotors(solarRotors);
@j1cs
j1cs / improve_fonts.md
Last active January 23, 2024 15:59
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
#!/bin/sh
# Based on https://gist.github.com/thrimbor/67d109004db28820bf918c8ac80f75d2
# BEFORE RUNNING THIS, go into the game's properties in steam and set "Force the use of a specific Steam Play compatability tool" to "Proton 4.2-9". Other versions may work as well, but that's what worked for me.
# Also click "SET LAUNCH OPTIONS" and input: WINEDLLOVERRIDES="mscoree=n" %command%
# If you have been experimenting with other workarounds to get the game running you might also want to "VERIFY INTEGRITY OF GAME FILES" on the "LOCAL FILES" tab.
# Finally in this script change the following line to point to your steamapps directory if it dowsn't already:
steamappsDir="$HOME/.local/share/Steam/steamapps"
@SirJson
SirJson / PKGBUILD
Created April 3, 2020 00:31
notes-up 2.0.2 AUR patch
# Contributor: NicoHood <archlinux {cat} nicohood {dog} de>
# Maintainer: Matthew Sexton <wsdmatty (at) _gmail_ (dot) _com_>
# PGP ID: 97928FA059F8050487930EAFACF6C1A315EDCB52
pkgname=notes-up
_pkgname=Notes-up
pkgver=2.0.2
pkgrel=2
pkgdesc="Markdown style notes manager written for elementary OS"
arch=('i686' 'x86_64')

Fix magisk stock backup does not exist

# put stock boot.img into /sdcard/boot.img

# get sha1
adb shell
su
SHA1=$(cat $(magisk --path)/.magisk/config | grep SHA1 | cut -d '=' -f 2)