View .screenrc
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
# Autodetach session on hangup instead of terminating screen completely | |
autodetach on | |
# Set the colors to 256 and enable bold. | |
term screen-256color | |
attrcolor b ".I" | |
# 30.000-line scrollback buffer. | |
defscrollback 30000 |
View plot_thd.py
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/env python | |
### plot_thd.py | |
### Plot the THD of a circuit over a range of frequencies using ngspice. | |
### | |
### Author: Nathan Campos <nathanpc@dreamintech.net> | |
import os | |
import sys | |
import subprocess |
View linear_vreg_res.R
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
#' linear_vreg_res.R | |
#' Calculates the resistor values to be used in a op-amp based linear voltage | |
#' regulator according to a specific selection of voltage references. | |
#' | |
#' @author Nathan Campos <nathanpc@dreamintech.net> | |
# Generates a E12 series of resistors. | |
e12_resistors <- function (steps = c(1000, 10000, 100000)) { | |
base = c(1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2) | |
e12 = c() |
View hello_dlg.asm
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
; Hello world in Assembler for the Win32 architecture | |
TITLE Hello world in win32. Tasm | |
VERSION T310 | |
Model use32 Flat,StdCall | |
start_code segment byte public 'code' use32 | |
begin: | |
Call MessageBox, 0, offset sHallo, offset caption, 0 |
View tic-tac-toe.sh
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/bash | |
# | |
####################################################### | |
# TIC TAC TOE # | |
# I WON'T GIVE YOU A CHANCE. YOU'LL NEVER WIN! # | |
####################################################### | |
# This program was developed as a funny way to test # | |
# the compatibility between arrays in ksh and bash. # | |
# Feel free for develop the module that the opponent # | |
# start playing, but don't forget to send me the new # |
View boot.asm
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
org 7C00h | |
mov ax, 1000h | |
mov ss, ax | |
mov sp, 0 ; Points to the top of the stack | |
mov ax, cs | |
mov ds, ax | |
mov ah, 02h ; Read sub function | |
mov al, 1 ; Number of sectors to read |
View div_neg.asm
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
; ******************** | |
; * DIVIDE.ASM * | |
; ******************** | |
.model small | |
.stack 512d | |
.data | |
a dw -9d | |
b db 2d |
View vbe_mouse.asm
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
org 100h | |
main: | |
call set_video_mode | |
.main_loop: | |
call get_mouse_input | |
call draw_top_bar | |
call get_keyboard_input | |
View addb.sh
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 | |
# Access AddressBook file and use it as a database | |
# Variables | |
name=$1 | |
number=$2 | |
db=AddressBook | |
### AddressBook File Example ### | |
# Maria Daher (27)5564-4392 # |
View ajax.js
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
function initAjax() { | |
var objXml = false; | |
if(window.XMLHttpRequest) { | |
objXml = new XMLHttpRequest(); // All modern browsers | |
} else if(window.ActiveXObject) { | |
try { | |
objXml = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer 6 | |
} catch(e) { | |
try { | |
objXml = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer 5 |
OlderNewer