This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
$aosd_path = "aosd_cat"; | |
@aosd_args = (); | |
push(@aosd_args, "--shadow-offset=1"); | |
push(@aosd_args, "--back-color=black"); | |
push(@aosd_args, "--back-opacity=255"); | |
push(@aosd_args, "--position=4"); | |
push(@aosd_args, "--padding=0"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <glib.h> | |
#include <gio/gio.h> | |
#include <string.h> | |
static GMainLoop *gMainLoop = NULL; | |
char * | |
decode (GFileMonitorEvent ev) | |
{ | |
char *fmt = g_malloc0 (1024); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* COMPILE WITH: gcc -Wall -o icon3 `pkg-config --cflags --libs gtk+-3.0` a.c */ | |
#include <gtk/gtk.h> | |
#include <string.h> | |
static void cb_left_click(GtkStatusIcon * icon, gpointer data) | |
{ | |
static GtkWidget *window = NULL; | |
if (window == NULL) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// how to read and print various things in /proc | |
///////////////////////////////// | |
// how to read /proc/*/stat | |
///////////////////////////////// | |
struct statStuff { | |
int pid; // %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Interrupt top | |
# | |
# Show the interrupts per second/per IRQ per CPU | |
# Parse /proc/interrupts file for data | |
# | |
# CPU0 CPU1 | |
# 0: 3025267376 3026744388 IO-APIC-edge timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2006, Intel Corporation | |
* Copyright (C) 2012, Neil Horman <[email protected]> | |
* | |
* This file is part of irqbalance | |
* | |
* This program file is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License as published by the | |
* Free Software Foundation; version 2 of the License. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2006, Intel Corporation | |
* Copyright (C) 2012, Neil Horman <[email protected]> | |
* | |
* This file is part of irqbalance | |
* | |
* This program file is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License as published by the | |
* Free Software Foundation; version 2 of the License. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# aptitude install bridge-utils | |
if1=eth0 | |
if2=eth1 | |
ifconfig $if1 down | |
ifconfig $if2 down | |
ifconfig $if1 0.0.0.0 up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# remember to edit /etc/sudoers file and grant tcpdump without | |
# password access to work in a scripting environment. sudo visudo | |
# username ALL=NOPASSWD:ALL,/sbin/tcpdump,/usr/bin/kill | |
import os | |
import signal | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define N 1024 | |
int mul1[N][N]; | |
int mul2[N][N]; | |
int res[N][N]; | |
void calculate(void) | |
{ | |
int i, j, k; |
OlderNewer