Skip to content

Instantly share code, notes, and snippets.

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@emasters
emasters / provision.sh
Created March 13, 2021 03:55 — forked from svpernova09/provision.sh
WSL PHP Development
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
# Update Package List
apt-get update
# Update System Packages
apt-get upgrade -y
@emasters
emasters / CAPAPIResult.html
Last active November 5, 2018 14:38
This is the retreived HTML in the [casebody][data] part of the result.
<section data-firstpage="912" data-lastpage="922" class="casebody"><section class="head-matter"><p id="b964-9" data-pgmap="964" class="court">United States Court of Appeals Eighth Circuit.</p>
<p id="b964-8" data-pgmap="964" class="docketnumber">No. 17104.</p>
<h4 id="b964-6" data-pgmap="964" class="parties">Harry J. STADIN, Appellant, v. UNION ELECTRIC COMPANY et al., Appellees.</h4>
<p id="b964-10" data-pgmap="964" class="decisiondate">Nov. 15, 1962.</p>
<p id="b964-11" data-pgmap="964" class="otherdate">Rehearing Denied Dec. 26, 1962.</p>
<p id="b966-3" data-pgmap="966" class="attorneys">J. Raymond Dyer, St. Louis, Mo., for appellant.</p>
<p id="b966-4" data-pgmap="966" class="attorneys">Alan C. Kohn, St. Louis, Mo., for ap­pellees Union Electric, Missouri Power &amp; Light Co. and Missouri Edison Co.; John A. Woodbridge, Coburn, Croft &amp; Cook, Thomas L. Croft, Peter W. Herzog, Jr., St. Louis, Mo., on the brief.</p>
@emasters
emasters / CAPAPIResult.json
Created November 5, 2018 14:34
This is the result of a request for a full text case using a specified citation: https://api.case.law/v1/cases/?cite=309 F.2d 912&full_case=true&body_format=html
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 196896,
"url": "https://api.case.law/v1/cases/196896/",
"name": "Harry J. STADIN, Appellant, v. UNION ELECTRIC COMPANY et al., Appellees",
"name_abbreviation": "Stadin v. Union Electric Co.",
@emasters
emasters / capapi.php
Last active November 2, 2018 18:32
First swipe at using the CAP API to retreive a the full text of a case.
<?php
/**
* Working with Harvard's CAP API
*
*/
$authorization = "Token your-API-key-here";
$cite = "309 F.2d 912";
$full_case = "true";
$body_format = "html";
<?php
error_reporting(E_ALL);
session_start();
$UploadFolder = "../guides/";
if (($tempName=$_FILES['file']['tmp_name'])!="")
{
//logmsg("tempName=$tempName");
@emasters
emasters / A2JFileInfo.php
Last active February 23, 2016 15:06
Minimal A2J GI uploading
<?php
/**
* 2/22/2016 ERM
* every upload has a Guide.xml file. Let's display it.
**/
header('Content-type: text/xml');
chdir($_GET['UploadDir']);
$xml = simplexml_load_file('Guide.xml');
echo $xml->asXML();
?>
@emasters
emasters / statetaxonomy.php
Created June 22, 2015 15:54
Create a states taxonomy
function create_states() {
$state_list = array('AL'=>"Alabama",
'AK'=>"Alaska",
'AZ'=>"Arizona",
'AR'=>"Arkansas",
'CA'=>"California",
'CO'=>"Colorado",
'CT'=>"Connecticut",
'DE'=>"Delaware",
@emasters
emasters / mailman.ini
Created December 10, 2014 11:56
Mailman - Nginx - Uwsgi
[uwsgi]
master = True
touch-reload = %p
daemonize = /var/log/uwsgi-mailman.log
# make sure pid file is readable and writable by uid listed below
pidfile = /tmp/uwsgi-mailman.pid
log-maxsize = 20971520
#port to listen on
@emasters
emasters / README.md
Last active August 29, 2015 14:09 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/