Skip to content

Instantly share code, notes, and snippets.

View agos's full-sized avatar

Agostino Carandente agos

View GitHub Profile
# @title Diff
# @matchuti public.diff-text
# @matchext diff, patch
# @matchfirstline (?x)^(=== modified file|====\s*//.+\s-\s.+\s+ ====|Index: |--- [^%]|\*\*\*.*\d{4}\s*$|\d+(,\d+)*(a|d|c)\d+(,\d+)*$|diff --git )
# language definition for files created with 'diff'
# diff created with -u option
state oldfile = '(?=^[-]{3})' begin
oldfile start '^[-]{3}'
@agos
agos / Kod Sample
Created January 4, 2011 00:36
Kod is using 80% CPU. It sampled itself o.O
Sampling process 77279 for 1 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Kod (pid 77279) every 1 millisecond
Call graph:
834 Thread_1465135 DispatchQueue_1: com.apple.main-thread (serial)
834 start
834 main
834 NSApplicationMain
834 -[NSApplication run]
834 -[NSApplication sendEvent:]
@agos
agos / Backtrace
Created January 11, 2011 01:08
Crash report
#0 0x00007fff8011b11c in objc_msgSend ()
#1 0x000000010001ddf0 in -[KBrowserWindowController updateToolbarWithContents:shouldRestoreState:] (self=0x102e481b0, _cmd=0x1003b38c0, contents=0x0, shouldRestore=0 '\0') at KBrowserWindowController.mm:346
#2 0x000000010076c00b in -[CTBrowserWindowController tabClosingWithContents:atIndex:] (self=0x102e481b0, _cmd=0x10078a988, contents=0x143df7280, index=44) at CTBrowserWindowController.mm:983
#3 0x000000010076b066 in CTTabStripModelObserverBridge::TabClosingAt (this=0x102e42fc0, contents=0x143df7280, index=44) at CTTabStripModelObserverBridge.mm:49
#4 0x0000000100752ef3 in CTTabStripModel::InternalCloseTab (this=0x141468ab0, contents=0x143df7280, index=44, create_historical_tabs=true) at CTTabStripModel.mm:984
#5 0x00000001007544c4 in CTTabStripModel::InternalCloseTabs (this=0x141468ab0, indices=@0x7fff5fbfeb18, close_types=2) at CTTabStripModel.mm:975
#6 0x0000000100755b98 in CTTabStripModel::CloseAllTabs (this=0x141468ab0) at CTTabStripModel.mm:372
#7 0x000
Process: Kod [780]
Path: /Applications/Kod.app/Contents/MacOS/Kod
Identifier: se.hunch.kod
Version: 0.0.3 (0.0.3)
Code Type: X86-64 (Native)
Parent Process: launchd [136]
Date/Time: 2011-01-11 23:44:07.667 +0100
OS Version: Mac OS X 10.6.6 (10J567)
Report Version: 6
@agos
agos / gist:945362
Created April 27, 2011 22:18
Kod console output
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys003
[Switching to process 74497 thread 0x0]
2011-04-28 00:19:13.196 Kod[74497:903] D [src/KMachService.mm:40] <KMachService: 0x101025a80> opened
2011-04-28 00:19:13.197 Kod[74497:3c03] D [src/KNodeThread.mm:95] [node] starting in <KNodeThread: 0x101025190>{name = se.hunch.kod.nodejs, num = 2}
@agos
agos / gist:945373
Created April 27, 2011 22:25
Another Kod hanging trace
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys003
[Switching to process 75024 thread 0x0]
2011-04-28 00:24:19.388 Kod[75024:3c03] D [src/KNodeThread.mm:95] [node] starting in <KNodeThread: 0x1010273c0>{name = se.hunch.kod.nodejs, num = 2}
2011-04-28 00:24:19.388 Kod[75024:903] D [src/KMachService.mm:40] <KMachService: 0x101005730> opened
@agos
agos / gist:964175
Created May 10, 2011 09:31
Sospetta bufala
ricevo ed inoltro. Margherita
Ciao a tutti,
confermo la necessità di questo passaparola, aggiungendo che si tratta di informazione per ri-affermare i diritti costituzionalmente garantiti . Il dramma è che sembra la maggior parte della popolazione non sia consapevole di quanto sta avvenendo.
Quello che Vi porto è solo un piccolo esempio. Sono una ricercatrice, mi occupo di diritto ambientale e di risorse idriche. Ieri mattina dovevo intervenire ad un programma RADIO RAI (programmato ormai da due settimane) per parlare del referendum sulla privatizzazione dell'acqua e chiarirne meglio le implicazioni giuridiche.
'E arrivata una circolare interna RAI alle 8 di ieri mattina che ha vietato con effetti immediati a qualunque programma della RAI di toccare l'argomento fino a giugno (12-13 giugno quando si terrà il referendum), quindi il programma è saltato e il mio intervento pure.
Questo è un piccolo esempio delle modalità con cui "il servizio pubblico" viene messo a tacere e di come si boicotti pesantemente l
;; ;;
;; ;;
; ________________________________________ ;
________________________________________
@agos
agos / py2app setup.py
Created July 21, 2011 22:38
py2app issue
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
@agos
agos / py2app error
Created July 21, 2011 22:42
py2app error
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024] <_FuncPtr object at 0x644b70>
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024] Traceback (most recent call last):
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024] File "/Users/mamma/Public/Drop Box/bmgui.app/Contents/Resources/__boot__.py", line 238, in <module>
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024]
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024] _run('bmgui.py')
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024] File "/Users/mamma/Public/Drop Box/bmgui.app/Contents/Resources/__boot__.py", line 210, in _run
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024]
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024] execfile(path, globals(), globals())
21/07/11 23.54.42 [0x0-0x94094].org.pythonmac.unspecified.bmgui[1024] File "/Users/mamma/Public/Drop Box/bmgui.app/Contents/Resources