Skip to content

Instantly share code, notes, and snippets.

Avatar
🐍
Programming

Travis Clarke clarketm

🐍
Programming
View GitHub Profile
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@clarketm
clarketm / private_fork.md
Created Nov 9, 2019 — forked from 0xjac/private_fork.md
Create a private fork of a public repository
View private_fork.md

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
    git clone --bare git@github.com:usi-systems/easytrace.git
@clarketm
clarketm / WARNING.md
Created Sep 29, 2019 — forked from Ambroos/WARNING.md
Remove SentinelOne agent from Mac. Because honestly, it doesn't seem to do anything at all. Run as root, best is to do this from a recovery mode, single user mode with writeable filesystem, ...
View WARNING.md

USE AT OWN RISK

This was only tested on a partial SentinelOne installation on the High Sierra beta, where SentinelOne was never allowed to enable it's kernel extension.

@clarketm
clarketm / nginx.conf
Created Jan 27, 2019 — forked from weapp/nginx.conf
Return common errors as json in Nginx
View nginx.conf
error_page 500 /500.html;
location /500.html{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
}
error_page 502 /502.html;
location /502.html{
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}';
}
@clarketm
clarketm / .gitignore
Created Dec 2, 2018 — forked from marsam/.gitignore
An IPython extension to pretty print python AST.
@clarketm
clarketm / curl.md
Created Aug 19, 2018 — forked from subfuzion/curl.md
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@clarketm
clarketm / python-es6-comparison.md
Created Jul 21, 2018 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison
View python-es6-comparison.md

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@clarketm
clarketm / README-Template.md
Created May 25, 2018 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@clarketm
clarketm / import_csv_to_mongo
Created Jan 24, 2018 — forked from mprajwala/import_csv_to_mongo
Store CSV data into mongodb using python pandas
View import_csv_to_mongo
#!/usr/bin/env python
import sys
import pandas as pd
import pymongo
import json
def import_content(filepath):
mng_client = pymongo.MongoClient('localhost', 27017)
@clarketm
clarketm / import_csv_to_mongo
Created Jan 24, 2018 — forked from mprajwala/import_csv_to_mongo
Store CSV data into mongodb using python pandas
View import_csv_to_mongo
#!/usr/bin/env python
import sys
import pandas as pd
import pymongo
import json
def import_content(filepath):
mng_client = pymongo.MongoClient('localhost', 27017)
You can’t perform that action at this time.