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/bash | |
echo "*System Version*" | |
system_profiler SPSoftwareDataType | grep -o -E -e 'macOS[^\n]+' | |
echo -e "\n*Xcode Info*" | |
xcodebuild -version | |
echo -e "\n*Active Simulators*" | |
xcrun simctl list devices 'booted' | grep -o -E -e '(iPad|iPhone).+?$' |
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
// | |
// NSPredicate.swift | |
// Nighthawk | |
// | |
// Created by Nathan Lawrence on 8/3/19. | |
// Copyright © 2019 Nathan Lawrence. All rights reserved. | |
// | |
import Foundation |
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
<p data-pym-src="https://www.path.to/the/thing/you/uploaded.html">Loading...</p><script type="text/javascript" src="https://pym.nprapps.org/pym-loader.v1.min.js"></script> |
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
// ==UserScript== | |
// @name Fix Core Publisher Printing Styles | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Make it so Core Publisher actually prints acceptably. | |
// @author Nathan Lawrence | |
// @match *://www.kbia.org/* | |
// @grant none | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== |
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> | |
<meta charset="utf-8"> | |
<div id="chart"></div> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script> | |
var data = [ | |
{name: "USA", value: 40, secondary_value: 37, tertiary_value: 12}, | |
{name: "UK", value: 20, secondary_value: 96, tertiary_value: 16}, |
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 os | |
import csv | |
from tqdm import tqdm | |
from google import search | |
file_name = "blah.csv" | |
output_file_name = "out.csv" | |
input_file = csv.DictReader(open(file_name, 'rU'), dialect='excel') | |
out_file = csv.DictWriter(open(output_file_name, 'w'), fieldnames=['query', 'result_url']) |
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
from peewee import * | |
database = PostgresqlDatabase('accessmo', **{'host': '*************', | |
'password': '**********', 'user': '************', 'port': 5432}) | |
# Initialize Deferred Relationships | |
DeferredSession = DeferredRelation() | |
DeferredLegislator = DeferredRelation() | |
DeferredLegislatorTwo = DeferredRelation() | |
DeferredMecCommittee = DeferredRelation() |
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
<script type="text/javascript" src="http://apps.nathanlawrence.org.s3.amazonaws.com/cp-tweaks/cp-topic-full-width.js"></script> |