Skip to content

Instantly share code, notes, and snippets.

@3v1n0
3v1n0 / python.vapi
Created October 12, 2011 22:55
A simple test to use python code from Vala
[CCode (lower_case_cprefix = "Py_", cheader_filename = "Python.h")]
namespace Python
{
public void Initialize ();
public void Finalize ();
[CCode (lower_case_cprefix = "PyRun_")]
namespace Run
{
public void SimpleString (string @string);
@3v1n0
3v1n0 / badunitymenus-gtkbuild.vala
Created October 14, 2011 22:33
Test bad menu files with Unity
using Gtk;
const string win_ui = """
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<object class="GtkWindow" id="window">
<property name="can_focus">False</property>
<property name="border_width">10</property>
<property name="title" translatable="yes">Sample Application</property>
Section "Files"
ModulePath "/usr/lib/xorg/modules/extensions"
ModulePath "/usr/lib/xorg/modules"
ModulePath "/usr/lib/x86_64-linux-gnu/xorg/extra-modules"
ModulePath "/usr/lib/xorg/extra-modules"
EndSection
Section "Module"
Load "glx"
EndSection
import QtQuick 2.2
import QtQuick.Window 2.1
import QtQuick.Controls 1.1
Window
{
id: main
visible: true
title: "Pizza Dough Helper"
@3v1n0
3v1n0 / lp-add-sru-bug.py
Last active September 6, 2017 06:47
Launchpad Tools
#!/usr/bin/python
import launchpadlib.launchpad
import sys
if len(sys.argv) < 2:
print "You need to pass the bug number to adjust"
sys.exit(1)
lp = launchpadlib.launchpad.Launchpad.login_with(u'rlp', u'production', version='devel')
@3v1n0
3v1n0 / xypos.vala
Last active August 29, 2015 14:06
XYPos
using Gtk;
// Compile with
// valac --pkg gtk+-3.0 --pkg gdk-x11-3.0 -X $(pkg-config xi --libs) xypos.vala
[CCode (gir_namespace = "xi", cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/extensions/XInput2.h")]
namespace XI
{
[Compact]
[CCode (cname = "Display")]
@3v1n0
3v1n0 / prefix-builder.sh
Last active September 13, 2016 15:31
prefix-builder.sh
#!/bin/bash
#
# Use
# eval $(prefix-builder.sh [add|rm|prepend|append] folder)
#
# or Alias such as:
# function eval_cmd() { eval $($*); }
# alias build-prefix="eval_cmd prefix-builder.sh"
# alias add-build-prefix="eval_cmd prefix-builder.sh add"
# alias rm-build-prefix="eval_cmd prefix-builder.sh rm"
@3v1n0
3v1n0 / parse-gov-certs.py
Last active November 14, 2023 21:28
ParseGovCerts
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) Marco Trevisan
#
# Authors:
# Marco Trevisan <marco@trevisan.xyz>
#
# Revision for new URL:
# Andrea Costantino <costan@amg.it>
#
@3v1n0
3v1n0 / gpControl.json
Last active November 2, 2020 22:05
GoPro Hero4 Remote tools
{
"version":2.0,
"display_hints":[
{
"key":"GPCAMERA_GROUP_VIDEO",
"display_name":"Video Settings",
"settings":[
{
"setting_id":5,
"widget_type":"select",

#GoPro HERO4 Black Wifi Hacking, ep 2

By Maelstrom Napalm, @odwdinc and Konrad Iturbe

###Status URL:

http://10.5.5.9/gp/gpControl/status

####Protune EV compensation: Value | URL