This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcalcli --client-id=IDHERE.apps.googleusercontent.com --client-secret=SECRETHERE add --calendar "CALENDARNAMEHERE" --duration 120 --where "Brattle Theater, Cambridge, MA" --noprompt --when "1/1/2024 5:00pm" --title "Lunch with mom" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p1 & (@small | @morning) & !@evening & today, p2 & (@small | @morning) & !@evening & today, p3 & (@small| @morning) & !@evening & today, p1 & !@small & !@morning & !@evening & (today | !@date-specific & ((due after: +2 days & due before: +4 days) | (due after: +9 days & due before: +12 days) | (due after: +35 days & due before: +40 days) | (due after: +75 days & due before: +85 days))), p2 & !@small & !@morning & !@evening & (today | !@date-specific & ((due after: +9 days & due before: +12 days) | (due after: +35 days & due before: +40 days) | (due after: +75 days & due before: +85 days))), p3 & !@small & !@morning & !@evening & (today | !@date-specific & ((due after: +9 days & due before: +12 days) | (due after: +35 days & due before: +40 days) | (due after: +75 days & due before: +85 days))), overdue & @small, No priority & !@evening & today, @evening & today |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import timeit | |
from multiprocessing.dummy import (Pool, TimeoutError) | |
def delay(mynum, delay_secs): | |
print("starting #%s" % mynum) | |
time.sleep(delay_secs) | |
print("done with #%s" % mynum) | |
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://code.jquery.com/jquery-git.js"></script> | |
<script language="JavaScript"> | |
$( document ).ready(function() { | |
$("#add").on("click", function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elementIsVisible (element) { | |
return this.driver.wait(until.elementIsVisible(element)); | |
} | |
elementIsNotVisible (element) { | |
return this.driver.wait(until.elementIsNotVisible(element)); | |
} | |
const abbyElement = await findByText('Abby'); // Should show editor for new costume | |
await elementIsVisible(abbyElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const costumesTabElement = await findByText('Costumes'); | |
await driver.wait(() => { | |
return costumesTabElement.isDisplayed().then(displayed => { | |
console.log('got here A'); | |
if (!displayed) return false; | |
console.log('got here B'); | |
// costumesTabElement.click(); | |
return costumesTabElement.isEnabled(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import pytz | |
# careful, don't assume now() is nyc time! on ec2, it's utc time. | |
def datetime_from_tz_naive_nyc_to_tz_aware_utc(nyc_datetime_tz_naive): | |
nyc_datetime_tz_aware = pytz.timezone('US/Eastern').localize(nyc_datetime_tz_naive) | |
return nyc_datetime_tz_aware.astimezone(pytz.utc) | |
def utc_tz_aware(utc_datetime_tz_naive): | |
return pytz.timezone('UTC').localize(utc_datetime_tz_naive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="legacy_content"> | |
<div class="glitch" data-text="500">500</div> | |
</div> | |
... | |
div { | |
display: block; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// data.json could look like: | |
// { | |
// "menu": [{"name": "Contact Us"}, {"name": "About Us"}] | |
// } | |
// app.js could look like: | |
var app = angular.module('myApp'); | |
app.factory('commonData', ['$http', '$q', function($http, $q){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- Pleace this snippet right after opening the head tag to make it work properly --> | |
<!-- This code is licensed under GNU GPL v3 --> | |
<!-- You are allowed to freely copy, distribute and use this code, but removing author credit is strictly prohibited --> | |
<!-- Generated by http://insider.zone/tools/client-side-url-redirect-generator/ --> | |
<!-- REDIRECTING STARTS --> | |
<link rel="canonical" href="http://destinationsitehere.com"/> |
NewerOlder