Skip to content

Instantly share code, notes, and snippets.

🌈

Idan Gazit idan

🌈
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 yodawg.html
<pre style="font: 6px/3px monospace;">+++++++++++++''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:;;;;;;;:::::;;;;;;;:::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;';';;;;;;;;;;;''''''''''''''''''';;;''''';;''''
+++++++++++++''''''''''';;'''''''''''''''''';;;;;;;;;;;;;;;;;;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;;;;;::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;;;';;'''
+++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;';''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;:;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;';;;;'''
'++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;:;;;;;;;;;;;;;;;;';;;;;;;;;;;;;;;;::::::;;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;''''''''''+''''''';;;;;''';;''''
''+++'+++++++''''''''''';;;;;;;''''''''''';;;;;;;;;;;;;;;;;;;;;;;';'''''''
View yodawg.txt
+++++++++++++''''''''''''''''''''''''''''''';;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:;;;;;;;:::::;;;;;;;:::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;';';;;;;;;;;;;''''''''''''''''''';;;''''';;''''
+++++++++++++''''''''''';;'''''''''''''''''';;;;;;;;;;;;;;;;;;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;;;;;::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;;;';;'''
+++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;';''''''''''''';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::::;;:;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;';;;;;;;;;;;;'''''''''''''''''';;;;;;';;;;'''
'++++++++++++''''''''''';;;;''''''''''''''';;;;;;;;;;;;;;;;;;;;;'''''''''''''';;;;;;;;;;:;;;;;;;;;;;;;;;;';;;;;;;;;;;;;;;;::::::;;;;:::::::::::::::::::::::::::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;''''''''''+''''''';;;;;''';;''''
''+++'+++++++''''''''''';;;;;;;''''''''''';;;;;;;;;;;;;;;;;;;;;;;';''''''''''';;;;;;;;;;;;:;;;;;;;;;;;;;;'''';';
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); }
}
@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 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 / gist:9596928
Created Mar 17, 2014
Python ISO week for date
View gist:9596928
import datetime
def week_for_date(target):
"""Given a target date, return a start and end for that date's ISO week.
The returned tuple includes two datetime.date's, (start, end):
start: midnight on the first day of the ISO week containing the target
end: midnight on the first day following the ISO week containing the target
Note that the end date represents the first date _not_ in the target week,
@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 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 / _colors.scss
Created Jan 29, 2014
Flat UI colors
View _colors.scss
// Colors from http://designmodo.github.com/Flat-UI/
$color-turquoise: #1abc9c;
$color-green-sea: #16a085;
$color-emerland: #2ecc71;
$color-nephritis: #27ae60;
$color-peter-river: #3498db;
$color-belize-hole: #2980b9;
$color-amethyst: #9b59b6;
$color-wisteria: #8e44ad;
$color-wet-asphalt: #34495e;
@idan
idan / .slate
Created Jan 25, 2014
Idan's Slate Config
View .slate
# Idan's ~/.slate
# I don't even know what these do but they came in the default. Might not need 'em
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
You can’t perform that action at this time.