Skip to content

Instantly share code, notes, and snippets.

View terrafied's full-sized avatar
💭
Shopping for cute shoes

Terra Metta terrafied

💭
Shopping for cute shoes
  • The Trans Agenda
  • 62 West Wallaby St., The Shire
View GitHub Profile
@terrafied
terrafied / GIF-Screencast-OSX.md
Created October 11, 2022 15:55 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@terrafied
terrafied / README.md
Created July 19, 2022 16:01 — forked from craig-m-unsw/README.md
Parallels (MacOS M1 host) Packer + Vagrant of Ubuntu 20.04 arm64. Installed with cloud-init and configured with Ansible.

parallels Packer (arm64)

A simple Packer + Vagrant install of Ubuntu 20.04 (Focal Fossa) LTS server for arm64, to run from my M1 Mac on Parallels Pro (17.1). Currently on MacOS Monterey.

Packer will run the ansible playbook.yml before the machine is shutdown and exported.

The installation is automated by cloud-init (which reads user-data). The file meta-data just needs to be an empty text file (you need to create this - no blank files or folders allowed in gists).

ubuntu2004/
@terrafied
terrafied / Dockerfile
Created May 17, 2022 16:23
Base image definition for sbg-webapp container
# syntax=docker/dockerfile:1
FROM ubuntu:xenial
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
RUN apt-get install -y cmake python3 python2.7 make gcc g++ git curl vim
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX
% Author: Honza Ustohal <honza@egoistic.biz>
% A few icons added by: Spencer Boucher <spencer.g.boucher@gmail.com>
%
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter
% This might be reworked into a full blown package in the near future
%
% Prerequisite:
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX
%
@terrafied
terrafied / delete-all-tweets.py
Last active November 10, 2022 20:20 — forked from ihpannu/delete-all-tweets.py
Python script to delete all tweets using Python version 3
import tweepy
import traceback
import _thread
consumer_key = ''
consumer_secret = ''
access_key = ''
access_secret = ''
@terrafied
terrafied / delete_all_tweets.py
Created January 25, 2022 18:53 — forked from davej/delete_all_tweets.py
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)
@terrafied
terrafied / pep-0008.md
Created October 4, 2021 22:31 — forked from zxjsdp/pep-0008.md
PEP8 Markdown Version (2016-03-25)
PEP: 8
Title: Style Guide for Python Code
Version: $Revision$
Last-Modified: $Date$
Author: Guido van Rossum <guido@python.org>,
        Barry Warsaw <barry@python.org>,
        Nick Coghlan <ncoghlan@gmail.com>
Status: Active
Type: Process

Content-Type: text/x-rst

@terrafied
terrafied / aioudp.py
Created October 29, 2020 17:02 — forked from vxgmichel/aioudp.py
High-level UDP endpoints for asyncio
"""Provide high-level UDP endpoints for asyncio.
Example:
async def main():
# Create a local UDP enpoint
local = await open_local_endpoint('localhost', 8888)
# Create a remote UDP enpoint, pointing to the first one
import json
import urllib2
data = {}
req = urllib2.Request("http://10.10.10.161:5000/apitest")
req.add_header('Content-Type', 'application/json')
response = urllib2.urlopen(req, json.dumps(data))
if response.get_code() != 200:
raise Exception("Response code: {0}".format(response.get_code())
@terrafied
terrafied / react_debug.log
Created August 22, 2019 18:16
debug log for react app issue
john@mettabuntu:~/kafka_logger/react_frontend$ cat /home/john/.npm/_logs/2019-08-22T18_02_44_128Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.11.1
3 info using node@v8.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react_frontend@0.1.0~prestart: react_frontend@0.1.0
6 info lifecycle react_frontend@0.1.0~start: react_frontend@0.1.0
7 verbose lifecycle react_frontend@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle react_frontend@0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/john/kafka_logger/react_frontend/node_modules/.bin:/home/john/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin