Skip to content

Instantly share code, notes, and snippets.

🤷‍♂
Thinking, maybe?

Idan Gazit idan

🤷‍♂
Thinking, maybe?
Block or report user

Report or block idan

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
View foo.py
from django.core.exceptions import ImproperlyConfigured
def get_env_variable(var_name):
""" Get the environment variable or return an exception """
try:
return os.environ[var_name]
except KeyError:
error_msg = "Set the {} environment variable".format(var_name)
raise ImproperlyConfigured(error_msg)
@idan
idan / README.md
Last active Aug 29, 2015
Standardizing Pagerduty Timezones
View README.md

Standardizing Pagerduty Timezones

Do you consume the Pagerduty API? Are you annoyed that the timezones they use aren't standard IANA timezone names used by pretty much every timezone library that builds on the Olson TZ database?

Yeah, me too.

I dug around and found a mapping, however it had a few inconsistencies. I've gone down the list and verified each one. Here's a JSON for you. Enjoy!

Diff of the zones I altered is below as well.

View keybase.md

Keybase proof

I hereby claim:

  • I am idan on github.
  • I am idan (https://keybase.io/idan) on keybase.
  • I have a public key whose fingerprint is 70F9 25D5 16F0 BB41 2528 4A9C 1D75 D464 EF68 5D48

To claim this, I am signing this object:

@idan
idan / foo.md
Created May 6, 2014
Test public gist!
View foo.md

I once knew a lady named Daria who was visiting friends in Ontario "It's so cold here!" she said As she snuggled in bed and related the news via ____________

View diagnostics.scss
.d3Content {
fill: none;
.area {
fill: #eee;
stroke: none;
&.light { fill: transparentize($light, 0.7); }
&.dark { fill: transparentize($dark, 0.7); }
&.crit { fill: transparentize($crit, 0.5); }
}
View yodawg.txt
+++++++++++++''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:;;;;;;;:::::;;;;;;;:::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;';';;;;;;;;;;;''''''''''''''''''';;;''''';;''''
+++++++++++++''''''''''';;'''''''''''''''''';;;;;;;;;;;;;;;;;;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;;;;;::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;;;';;'''
+++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;';''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;:;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;';;;;'''
'++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;:;;;;;;;;;;;;;;;;';;;;;;;;;;;;;;;;::::::;;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;''''''''''+''''''';;;;;''';;''''
''+++'+++++++''''''''''';;;;;;;''''''''''';;;;;;;;;;;;;;;;;;;;;;;';''''''''''';;;;;;;;;;;;:;;;;;;;;;;;;;;'''';';
View yodawg.html
<pre style="font: 6px/3px monospace;">+++++++++++++''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:;;;;;;;:::::;;;;;;;:::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;';';;;;;;;;;;;''''''''''''''''''';;;''''';;''''
+++++++++++++''''''''''';;'''''''''''''''''';;;;;;;;;;;;;;;;;;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;;;;;::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;;;';;'''
+++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;';''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;:;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;';;;;'''
'++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;:;;;;;;;;;;;;;;;;';;;;;;;;;;;;;;;;::::::;;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;''''''''''+''''''';;;;;''';;''''
''+++'+++++++''''''''''';;;;;;;''''''''''';;;;;;;;;;;;;;;;;;;;;;;';'''''''
@idan
idan / private.xml
Created Sep 4, 2014
Idan's Karabiner private.xml
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Remap Caps Lock to Hyper</name>
<appendix>OS X doesn't have a Hyper. This maps Left Control to Control + Shift + Option + Command.</appendix>
<identifier>caps_lock_to_hyper</identifier>
<autogen>
--KeyToKey--
@idan
idan / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@idan
idan / javascript_resources.md
Last active Aug 29, 2015 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
You can’t perform that action at this time.