Skip to content

Instantly share code, notes, and snippets.

View danielkza's full-sized avatar

Daniel Miranda danielkza

  • Vonage
  • London, United Kingdom
View GitHub Profile
@danielkza
danielkza / example.js
Created September 14, 2012 22:21
registerFooCallbacks
// Scans an object for WSH-Panel callbacks, and registers them.
function registerFooCallbacks(obj)
{
if(!(obj instanceof Object))
return false;
// grab a reference to the global context
var global = (function() { return this; })();
for(var attr in obj) {
@danielkza
danielkza / br-abnt2.src
Created September 17, 2012 21:21
Minix ABNT2 keymap
/* Keymap for ABNT-2 Brazilian Portuguese - David Augusto / Daniel Miranda 2012 */
/* scan-code !Shift Shift Alt1 Alt2 Alt+Sh Ctrl */
/* ==================================================================== */
/* 00 - none */ 0, 0, 0, 0, 0, 0,
/* 01 - ESC */ C('['), C('['), CA('['),CA('['),CA('['),C('['),
/* 02 - '1' */ '1', '!', A('1'), A('1'), A('!'), C('A'),
/* 03 - '2' */ '2', '@', A('2'), A('2'), A('@'), C('@'),
/* 04 - '3' */ '3', '#', A('3'), A('3'), A('#'), C('C'),
/* 05 - '4' */ '4', '$', A('4'), A('4'), A('$'), C('D'),
@danielkza
danielkza / proposta.md
Created September 18, 2012 20:11
Proposta EP2 MAC0422

Plano de Implementação: Semáforos no Minix

Daniel Q. Miranda - Nº USP 7577406

Criação da chamada de sistema

  • Adicionar uma entrada a lista de chamadas do sistema, nos arquivos /usr/src/include/minix/callnr.h

#define SEM_GET 114

@danielkza
danielkza / Monokai.tmTheme
Created September 29, 2012 07:09
Monokai theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@danielkza
danielkza / asd.txt
Created November 29, 2012 00:40
lista 5 formais
1a) s3 -> s4 -> s3 -> ...
falsa
1b) s3 -> s4
falsa
1c) s3 -> s4 -> s3
char buf[10];
if(fgets(buf, sizeof(buf), stdin) != NULL)
// blah
@danielkza
danielkza / rsmith_save.c
Created December 24, 2012 18:49
Rocksmith save game transfer tool
// Author: pcsmith
// Modifications: danielkza (danielkza2@gmail.com)
// License: GPLv3 https://www.gnu.org/licenses/gpl.html
// More info: http://rsmods.oakey-dev.eu/index.php?title=Savegame_Transfer
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@danielkza
danielkza / MemTestG80_AutoOC.ps1
Last active December 11, 2015 14:58
Automatic Memory Clock tester for NVIDIA cards
<#
.SYNOPSIS
Automatic NVIDIA memory clock tester
.DESCRIPTION
Using MemTestG80 and MSI Afterburner, this program automatically tests
memory clocks to find the highest stable clock possible.
MSI Afterburner must be running, and a driver supporting CUDA must be
installed (any recent driver should be fine).
import os
import shutil
rootDir = 'G:/testasd/'
print('[',rootDir,']')
for (dirPath, dirNames, fileNames) in os.walk(rootDir):
for file in fileNames:
root, ext = os.path.splitext(file)
if ext not in ('.mp3', '.flac', '.m4a'):
#!/bin/bash
SSH=$(which ssh)
hosts=()
params=()
sep_found=0
for arg in "$@"
do