Skip to content

Instantly share code, notes, and snippets.

View fracek's full-sized avatar
🎯
Focusing

Francesco Ceccon fracek

🎯
Focusing
View GitHub Profile
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
@fracek
fracek / gist:2890679
Created June 7, 2012 18:40
Go function
func toString(v interface{}) string {
if reflect.TypeOf(v) == nil {
return ""
}
return v.(string)
}
@fracek
fracek / parse.js
Created June 13, 2012 13:13
parse command
#!/usr/bin/env node
/*
* Given a string return a map in the form { cmd: 'args', cmd2: 'args' }
*/
function parseCommand(s) {
m = {}
state = 0;
currentcmd = '';
currentargs = '';
@fracek
fracek / CMakeLists.txt
Last active May 12, 2024 17:13
CMake and GTK+ 3
# Thanks to @danger89 and @Ilothar for updating the gist.
# Set the name and the supported language of the project
project(hello-world C CXX)
# Set the minimum version of cmake required to build this project
cmake_minimum_required(VERSION 3.10)
# Use the package PkgConfig to detect GTK+ headers/library files
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtkmm-3.0)
@fracek
fracek / gist:3782532
Created September 25, 2012 15:16
ND Wowstead
.post h2.caption a {
font-size: 2em !important;
}
/* Smartphones (portrait and landscape) ---------- */
@media only screen and (max-width : 480px) {
/* Hide some stuff */
#leftnav {
display: none;
@fracek
fracek / robot.js
Created December 14, 2012 19:21
Robotomy
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
this.searching = true;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@fracek
fracek / backup-issues.js
Created December 23, 2012 12:15
Save the current open issues for the given repository
#!/usr/bin/env node
var github = require('octonode');
function link_to(text, url) {
return '['+text+']('+url+')';
}
var client = github.client();
var repo_name = process.argv[2];
#!/usr/bin/env python
# Taken from: http://mybyteofcode.blogspot.it/2010/01/use-markdown-and-pygments-with-blogger.html
# All credits to the original author
# Modified to work with Marked.app
import sys
import os
import markdown
# Read the given file, convert it to html then return the html
def convert(file):
@fracek
fracek / monokai.xml
Created December 26, 2012 14:12
Monokai color theme for QT Creator. Found it somewhere on the 'net, slightly modified by me.
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Monokai">
<style name="Text" foreground="#e6e5e2" background="#272822"/>
<style name="Link" foreground="#66d9ef"/>
<style name="Selection" foreground="#e6e5e2" background="#49483e"/>
<style name="LineNumber" foreground="#a0a19c" background="#272822"/>
<style name="SearchResult" foreground="#ffffff" background="#2572b8"/>
<style name="SearchScope" foreground="#000000" background="#e2efff"/>
<style name="Parentheses" foreground="#ff0000" background="#c3e1ff"/>
<style name="CurrentLine" background="#3e3d32"/>
@fracek
fracek / login
Created January 5, 2013 21:35
WeeChat plugin to store login credentials in a separate file. Create a `login` file in `~/.weechat/login` and put a connection command on each line.
irc.freenode.net -username=toethumb -autojoin=weechat,test -nicks=toethumb
irc.quakenet.org -nicks=ninjaduck,ninjaduck2 -autojoin=mmo-champion