Skip to content

Instantly share code, notes, and snippets.

View maluta's full-sized avatar

Tiago Maluta maluta

View GitHub Profile
#include <stdio.h>
struct teste {
unsigned int a0 : 1;
unsigned int a1 : 1;
unsigned int a2 : 2;
unsigned int a3 : 4;
};
@maluta
maluta / .muttrc
Created November 11, 2009 16:52
My muttrc configuration file to GMAIL (IMAP)
# The .muttrc file
# Tiago Maluta
set imap_user = "[email protected]"
set imap_pass = "PASSWORD"
#set spoolfile = imaps://imap.gmail.com:993/INBOX
set spoolfile = imaps://imap.gmail.com:993/lkml
set folder = imaps://imap.gmail.com:993
set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
#!/bin/sh
# Download, Compile and Install
_wget=`which wget`
_mkdir=`which mkdir`
$_mkdir translate
cd translate
$_wget http://github.com/maluta/junk/raw/master/translate.pro
# /etc/fstab
# Created by anaconda on Tue Jun 16 11:47:41 2009
UUID=5ba7382e-7400-4997-97ad-9f44b4a10643 /boot ext2 defaults 1 2
/dev/mapper/vg_fedora-LogVol00 / ext4 defaults 1 1
/dev/mapper/vg_fedora-LogVol01 swap swap defaults 0 0
/dev/sda3 /opt ext3 defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
/*
Before run this program *read* the documentation and check
what this program do.
$KDIR/arch/x86/include/asm/unistd_32.h (32 bits)
$KDIR/arch/x86/include/asm/unistd_64.h (64 bits)
THERE IS NO WARRANTY.
*/
#!/bin/bash
# Mount a source directory or fs type $i in destination mount point $j
# using options $k
#
# i j k
mdirs=(
"unionfs" "/opt/unionfs" "-t unionfs -o dirs=/opt/sandbox:/=ro"
"/dev" "/opt/unionfs/dev" "--bind"
"devpts" "/opt/unionfs/dev/pts" "-t devpts"
#!/bin/sh
count='0'
while [ 1 ]
do
#mem_total=`free | grep "^Mem" | awk '{ print $2 }'`
mem_used=`free | grep "^Mem" | awk '{ print $3 }'`
mem_free=`free | grep "^Mem" | awk '{ print $4 }'`
echo -e $count '\t' $mem_total '\t' $mem_used '\t' $mem_free
Signed-off-by: Tiago Maluta <[email protected]>
---
mainwindow.ui | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/mainwindow.ui b/mainwindow.ui
index 3185afb..dfe0cb3 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -143,9 +143,6 @@
@maluta
maluta / t.py
Created February 27, 2010 03:19
class Foo:
def __init__(self,p):
print "__init2__"
def __init__(self): # tem prioridade
print "__init__"
def function(self, param):
print "function with 1 parameter"
@maluta
maluta / m.erl
Created February 28, 2010 01:18
-module(m).
-export([start/0,ui_recvMessage/2,open/0,validate/2]).
start() ->
io:format("Starting message~n").
ui_recvMessage(Api_token,Message) ->
io:format("Received:~n token=~w Message=~w~n",[Api_token,Message]),
case Message of
"open" -> io:format("lets call open()~n"),