Skip to content

Instantly share code, notes, and snippets.

View Nooby's full-sized avatar

Giuliano Di Pasquale Nooby

  • Germany
View GitHub Profile
@Nooby
Nooby / keybase.md
Last active September 29, 2018 21:06

Keybase proof

I hereby claim:

  • I am Nooby on github.
  • I am nooby (https://keybase.io/nooby) on keybase.
  • I have a public key whose fingerprint is 41E5 43FC DC57 3530 F8B6 C918 EDDF A1DB 2FE6 DA20

To claim this, I am signing this object:

@Nooby
Nooby / math-misc.lsp
Last active December 22, 2015 06:28
Some useful math functions for lisp.
(defun cube-root (n)
;; Calculates the Cube Root of n.
(expt n 1/3))
(defun factors (n &aux (lows '()) (highs '()))
;; We iterate in the range 1..sqrt(n) collecting ‘low’ factors and corresponding ‘high’ factors,
;; and combine at the end to produce an ordered list of factors.
;; http://rosettacode.org/wiki/Factors_of_an_integer#Common_Lisp
(do ((limit (isqrt n)) (factor 1 (1+ factor)))
@Nooby
Nooby / Event.py
Created March 8, 2012 17:12
Simple Events for Python
class EventHook(object):
def __init__(self):
self.__handlers = []
def __iadd__(self, handler):
self.__handlers.append(handler)
return self
def __isub__(self, handler):
@Nooby
Nooby / changeDisplay.sh
Created December 1, 2011 22:36
Change Primary Display in Gnome 3 to External Display if Available
#!/bin/sh
DISP=`xrandr | tac | grep " connected " -m 1 | cut -d ' ' -f 1`
xrandr --output $DISP --primary
@Nooby
Nooby / SimpleProgress.py
Created August 7, 2011 15:59
Simple Progress Bar for Console Applications
#!/usr/bin/python
import sys
import StringIO
class SimpleProgress():
def __init__(self, message, max):
self.message = message
self.max = max
self.current = 0
@Nooby
Nooby / .gitignore
Created February 5, 2011 21:09
Global Git Ignore File for Linux/Eclipse/PyDev.
##########################
#Linux Specific GitIgnore#
##########################
.*
!.gitignore
*~
*.sw[a-p]
# KDE
.directory
@Nooby
Nooby / ExterneToolsUndMenue.vssettings
Created June 4, 2010 07:49
Aus Visual Studio 2010 Exportierte Konfiguration für ein Schwarzes Editor Fenster und Git Integration.
<UserSettings>
<ApplicationIdentity version="10.0"/>
<ToolsOptions/>
<Category name="Database Tools" RegisteredName="Database Tools"/>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_CommandBars" Category="{B9D9C123-B500-4202-B887-57C829CBD08F}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_CommandBars" PackageName="Visual Studio Environment Package">
<CommandBars Version="05072811">
<DefaultCustomizations/>
<UserCustomizations>
<add_group Group="{8308BE2D-46EE-45A8-B20E-FCACA7F778AA}:00000201" GroupPri="40000001" Menu="{ADC1BC7B-958B-4548-9F9F-10FC49099825}:00004200"/>