Skip to content

Instantly share code, notes, and snippets.

# Autogenerated input type of AddComment
input AddCommentInput {
# A unique identifier for the client performing the mutation.
clientMutationId: String
# The Node ID of the subject to modify.
subjectId: ID!
# The contents of the comment.
body: String!
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
@djmitche
djmitche / @@INTRO.md
Last active March 18, 2024 16:08
My use of Taskwarrior

Getting Started

My Usage

I've been using this for almost ten years now, so here are some of the ways I have set it up to be most productive. See my taskrc below for implementation details.

In general, I've had the most success by keeping lists of tasks short and to the point, avoiding the anxiety of seeing 100 tasks and feeling like I'm going to drown.

@marcwjj
marcwjj / mosh-setup-guide.md
Last active November 12, 2023 12:17
Step by step guide to setup mosh ssh client to Google Cloud VM instance

A beginner's guide to setup Mosh roaming terminal on Mac to access Google Cloud Compute Engine instance

Being new to training ML models using Google Cloud VM instances, I faced issues where my ssh connection to the cloud instance (using either the clound web-based ssh client or using cloud shell) would disconnect from time to time (for example when I power off my laptop or the network gets disconnected) which would terminate the model training process. Therefore I searched for a ssh client that can handle disconnection and can resume connection without disrupting the process running on the server and came across with Mosh mobile shell, a remote terminal app that supports roaming.

It took me a while to figure out how to set up a third party ssh terminal using the google cloud OAuth. Here's a step-by-step guide:

Update: a simpler alternative for persisting remote sessions

Since this writing, another Mosh user kindly advised me that using terminal multiplexer co

@jessfraz
jessfraz / boxstarter.ps1
Last active February 14, 2024 15:54
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@narate
narate / create-hotspot.md
Last active March 25, 2024 13:47
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@elehcim
elehcim / build.sh
Last active January 11, 2024 22:58
termux conda installation trial
apt update && apt upgrade
apt install python python-dev pip clang
pip install --upgrade pip
pip install conda
## All the following packages are needed by conda
pip install auxlib ruamel.yaml requests
## Install pycosat (this can be ignored if https://github.com/ContinuumIO/pycosat/pull/29 is fixed)
wget https://pypi.python.org/packages/76/0f/16edae7bc75b79376f2c260b7a459829785f08e463ecf74a8ccdef62dd4a/pycosat-0.6.1.tar.gz#md5=c1fc35b17865f5f992595ae0362f9f9f
tar -xf pycosat-0.6.1.tar.gz

Interactive Machine Learning

Taught by Brad Knox at the MIT Media Lab in 2014. Course website. Lecture and visiting speaker notes.

@dkw72n
dkw72n / psd
Created March 26, 2016 14:32
an auxiliary android shell script that keeps your Apps "staying" on your SD card after an update
#!/system/bin/sh
# What is this?
# PSD (Pin to the SD card), is an auxiliary script that keeps your Apps "staying" on your SD card.
# "staying" is quoted because what it actually do is moving your app back to the SD card again after an update.
# Why?
# a. Since Android Lollipop, the apps you moved to the SD card will back to internal storage after an update.
# b. My phone has a small internal storage and running Android Lollipop.
# c. I am not going to buy another phone or downgrade to Kitkat.
@justanr
justanr / _core.py
Last active December 14, 2023 02:47
Clean Architecture In Python
from abc import ABC, ABCMeta, abstractmethod
from collections import namedtuple
from itertools import count
PayloadFactory = namedtuple('PayloadFactory', [
'good', 'created', 'queued', 'unchanged', 'requires_auth',
'permission_denied', 'not_found', 'invalid', 'error'
])
"""