Skip to content

Instantly share code, notes, and snippets.

options i915 enable_guc=2 fastboot=1 force_probe=*
[Unit]
Description=Powertop tunings
[Service]
Type=exec
ExecStart=/usr/sbin/powertop --auto-tune
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
[Match]
Name=lo
[Network]
Address=127.0.0.1/8
@angeldm
angeldm / ssh.service
Created April 30, 2019 18:53
Avahi ssh service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<!--
This file is part of avahi.
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
@angeldm
angeldm / ssh.service
Created April 30, 2019 18:53
Avahi ssh service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<!--
This file is part of avahi.
avahi is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
@angeldm
angeldm / run.sh
Created March 14, 2013 18:35
Eclipse on Mac with jdk 1.7
#!/bin/sh
#
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home
LAUNCHER_JAR=plugins/org.eclipse.equinox.launcher_1.3.0.v20130125-144918.jar
java \
-showversion \
-XX:MaxPermSize=256m \
-Xms1024m \
-Xmx1024m \
@angeldm
angeldm / highlight.rb
Created February 7, 2013 22:28
Highlight Formula
require 'formula'
class Highlight < Formula
homepage 'http://www.andre-simon.de/doku/highlight/en/highlight.html'
url 'http://www.andre-simon.de/zip/highlight-3.13.tar.bz2'
sha1 '8b0861a657f0e73911f514a16ff5136c37f4f724'
depends_on 'boost'
depends_on 'lua'
depends_on 'pkg-config'
@angeldm
angeldm / gist:4663739
Created January 29, 2013 12:00
Detecting Font size using Tesseract+Leptonica
/*
http://pastebin.com/0dV84hBa
g++ -o test_font_features test_font_features-2.cpp -ltesseract
*/
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
int main() {
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
@angeldm
angeldm / gist:3668328
Created September 7, 2012 18:19
Marshal
package main
import (
"encoding/xml"
"fmt"
)
type DIDLLite struct {
XMLName xml.Name
DC string `xml:"xmlns:dc,attr"`
@angeldm
angeldm / sort.go
Created April 27, 2012 16:35
Sort Byte
package main
import (
"fmt"
"sort"
)
type ByteSlice []byte
func (p ByteSlice) Len() int { return len(p) }