Skip to content

Instantly share code, notes, and snippets.

Nil-Zil

Block or report user

Report or block Nil-Zil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@niladam
niladam / TransmitOpenTerminal.txt
Created Oct 24, 2017 — forked from johnfmorton/TransmitOpenTerminal.txt
Use Transmit 5 to open in iTerm (instead of Terminal.app) as mentioned here https://library.panic.com/transmit5/open-in-terminal/
View TransmitOpenTerminal.txt
on openTerminal(location, remoteHost, serverPort)
tell application "System Events"
-- some versions might identify as "iTerm2" instead of "iTerm"
set isRunning to (exists (processes where name is "iTerm")) or (exists (processes where name is "iTerm2"))
end tell
tell application "iTerm"
activate
set targetTab to ""
@alfredopalhares
alfredopalhares / gist:d475257c84410c7fcca6
Last active Apr 5, 2018
Restoring a PDF file from chrome cache
View gist:d475257c84410c7fcca6

So I was trying to do my duties as a good civilian by paying taxes of stuff you already own.

In this particular case it meant going to the website and try and generate a PDF document that would allow me to pay for said stuff. After 2 unsuccessful attempts to generate the PDF (got greeted by 500s), I finally got the PDF open on chromium (using the PDF preview) and trying to save, the browser crashed..

I then quickly reboot chromium and tried to generate the PDF again, only to find out that I can't, the website only allows you to generate the document and download once, this is a critical document used as prof and means to pay your taxes. It doesn't really make much sense that you only can download it once, but such is the way of life.

I've been suffering from this bug for quite a while, but it never affected me in this way.

The file wasn't on ~/Downloads, so I've tried browsing chrome://cache and after a while I found the PDF HTTP request, w

@typerandom
typerandom / python-convert-dictionary-to-object
Created Nov 22, 2013
Convert a dictionary to an object (recursive).
View python-convert-dictionary-to-object
class DictionaryUtility:
"""
Utility methods for dealing with dictionaries.
"""
@staticmethod
def to_object(item):
"""
Convert a dictionary to an object (recursive).
"""
def convert(item):
You can’t perform that action at this time.