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
/* | |
This can be used in unit tests to simulate a DOM document. | |
I have implemented the bare minimum. Feel free to add more, or to change my implementation. | |
Sample Usage: | |
import 'jasmine'; | |
import { MockElement } from './support/mock-element'; |
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
# Because there's nothing easily google-able for how to do this, here's | |
# a script to show the "basics" and create a permanent memorial to the | |
# week of my life it took to learn this | |
# 1. Install the Power Apps CLI via Powershell | |
# 2. Install node | |
# 3. Add node and install pcf-scripts (https://www.npmjs.com/package/pcf-scripts) | |
# 4. Run pcf scripts | |
# 5. Run msbuild on project file(s) | |
# 6. Run deployment Powershell script which looks like this: | |
# Install-Module Microsoft.Xrm.Data.PowerShell -Scope CurrentUser -Force |
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 python3 | |
import logging | |
from bs4 import BeautifulSoup | |
import requests | |
import spotipy | |
from spotipy.oauth2 import SpotifyOAuth | |
logger = logging.getLogger(__name__) |
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 python3 | |
#-*- coding: utf-8 -*- | |
from functools import reduce | |
import operator | |
from random import randrange | |
from typing import Sequence | |
PROMPT = "What's the answer? " |
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 bash | |
files=$(git diff --cached --name-only --staged --diff-filter=ACM WA-2310 | grep '\.jsx\?$') | |
echo ${files} | xargs eslint |
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/python | |
# -*- coding: utf-8 -*- | |
### BEGIN LICENSE | |
#Copyright (c) 2009 Eugene Kaznacheev <qetzal@gmail.com> | |
#Copyright (c) 2013 Joshua Tasker <jtasker@gmail.com> | |
#Permission is hereby granted, free of charge, to any person | |
#obtaining a copy of this software and associated documentation | |
#files (the "Software"), to deal in the Software without | |
#restriction, including without limitation the rights to use, |
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 os | |
import tarfile | |
import time | |
from django.conf import settings | |
from django.core.mail import mail_admins | |
from django.core.management.base import BaseCommand | |
from boto.s3.connection import S3Connection |
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
/** | |
* WkHtmlToPdf table vertically-splitting hack | |
* Script to automatically split wide HTML tables that doesn't fit the width of the PDF page generated | |
* by WkHtmlToPdf (or equivalent) | |
* | |
* The general idea come from Florin Stancu <niflostancu@gmail.com> and his script wkhtmltopdf.tablesplit.js | |
* The implementation is quite different because the splitting is done vertically on a excessive | |
* wide table, while the original script was meant to split horizontally an excessive long table | |
* | |
* To use, you must adjust pdfPage object's contents to reflect your PDF's |
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
var app = new Vue({ | |
http: { | |
headers: { | |
"X-CSRFToken": window.csrf_token | |
} | |
}, | |
el: "#admin-dash-users", | |
data: { | |
addresses: [], | |
count: 0, |
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 bash | |
rc=0 | |
head=`git symbolic-ref HEAD` | |
#if echo $head | grep -E 'releases?/[0-9]\.[0-9]+|master' | |
#then | |
# echo "You cannot commit directly to a release branch" | |
# echo "Stash your changes and apply them to another branch" | |
# echo "or create a branch directly from these changes" |
NewerOlder