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 assert = require("assert"); | |
describe("Async Tests", function() { | |
it("uses callback", function(done) { | |
console.log("Starting test..."); | |
setTimeout(()=>{ | |
assert.ok("Timeout complete"); | |
console.log("Test complete"); | |
done(); | |
}, 1000); |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
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
@ECHO off | |
REM Patch eventmachine.rb to enable Jekyll livereload (jekyll serve -l) | |
REM Resolves the following error on Windows 10: | |
REM "Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'" | |
REM Tested on Ruby2.7, might also work on earlier versions. | |
REM See https://github.com/tabler/tabler/issues/155 | |
REM Find eventmachine.rb | |
FOR /F "delims=" %%i IN ('gem environment gemdir') DO set gemdir=%%i |
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
REM: Depends on WSL (Windows Subsystem for Linux) | |
REM: Install WSL and then place this file in a directory included in your system PATH. | |
REM: Thanks to https://medium.com/powershell-explained/text-editor-inside-powershell-22d2f5e748b8 | |
@ECHO off | |
bash.exe -c "vim %1" |
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 pandas as pd | |
def display_small(df): | |
# pd.set_option('display.max_rows', 20) | |
return df.style.set_table_styles([ | |
dict(selector="th", props=[("font-size", "7pt"), ("text-align", "center")]), | |
dict(selector='td', props=[('font-size', '7pt')]), | |
]) | |
df = pd.DataFrame([{'a':1,'b':2},{'a':3,'b':5}]) |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
from plumbum import colors, cli | |
from plumbum.cmd import du | |
import sys | |
class MyApp(cli.Application): | |
path = cli.Flag(['p','path'],help="Path to search. (default: '.')") |
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
{ | |
"Type" : "Notification", | |
"MessageId" : "531cb486-97ba-51cf-a438-e2aea8f027d3", | |
"TopicArn" : "arn:aws:sns:us-east-1:980559779107:HelloSNS", | |
"Message" : "Verify this!", | |
"Timestamp" : "2019-10-21T23:19:38.256Z", | |
"SignatureVersion" : "1", | |
"Signature" : "qYOYu1oxQbMLlpVec1cUCXV1Ye0OOviZ+XoO/mh+3SdsenlX6pi+j8t/lbvdnlwI/2zY1XT0CC9i4VIuy5gzP2toL8W2t9S0rc1yIg2Aj3v+mw6UNcBdp7suMWJk4v6totFMNhBqAs0gs+06DRBAyb+s45KWrcv+vq5chfn46Jvbe6GP5K8eYU2u0gjZ8nVbmb//lH5HOugQGi/3PMWXX13xGp4pqC7PWMb+WGxyHh8iXzHXInIcMGv5KWj+pQnbh3ADQ5EamBx63S240sS1bPumkQW0So9ec4qJbauAMhS95cmjyQBALd0DLJE7TNwcv+mTQQyfEL9H1Wgrbt86nA==", | |
"SigningCertURL" : "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-6aad65c2f9911b05cd53efda11f913f9.pem", | |
"UnsubscribeURL" : "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:980559779107:HelloSNS:372a1c41-0c8b-40f7-9a8b-e28553258d83" |
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
#!/bin/sh | |
if [ -z $1 ]; then | |
echo "Usage: $0 <target_venv>" | |
exit 1 | |
fi | |
env_name=$(basename $1) | |
patch_str='57,58c57,60\n< if [ "x('$env_name') " != x ] ; then\n< \tPS1="('$env_name') ${PS1:-}"\n---\n> PS1=${PS1/(`cat /etc/debian_chroot`)//}\n> PS1=${PS1/\$\{debian_chroot\:\+(\\$debian_chroot)\}/}\n> if [ "x($(basename $(dirname $VIRTUAL_ENV))/$(basename $VIRTUAL_ENV)) " != x ] ; then\n> PS1="($(basename $(dirname $VIRTUAL_ENV))/$(basename $VIRTUAL_ENV)) ${PS1:-}"\n> PS1="($(basename $(dirname $VIRTUAL_ENV))/$(basename $VIRTUAL_ENV)) ${PS1:-}"' | |
activate_file="$1/bin/activate" |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<polymer-element name="my-element"> |