Skip to content

Instantly share code, notes, and snippets.

View cparker15's full-sized avatar

Christopher Parker cparker15

View GitHub Profile
@Wingysam
Wingysam / git-archive.user.js
Last active May 25, 2024 20:45
Git Archive
// ==UserScript==
// @name Git Archive
// @namespace http://wingysam.xyz/
// @version 2.4
// @description Mirror every git repo you look at to gitea
// @author Wingy <git@wingysam.xyz>
// @include *
// @grant GM_xmlhttpRequest
// @grant GM_notification
// @grant GM_openInTab
@oofnikj
oofnikj / answerfile
Last active June 15, 2024 02:40
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
#region Ensure the WinRm service is running
Set-Service -Name "WinRM" -StartupType Automatic
Start-Service -Name "WinRM"
#endregion
#region Enable PS remoting
if (-not (Get-PSSessionConfiguration) -or (-not (Get-ChildItem WSMan:\localhost\Listener))) {
Enable-PSRemoting -SkipNetworkProfileCheck -Force
}
#endregion
@kuttor
kuttor / ansible-termux.sh
Created March 19, 2019 06:04
Get Ansible working on an Android phone using a Terminal Emulator like Termux
#!/data/data/com.termux/files/usr/bin/bash
yes | pkg upgrade && \
yes | pkg install \
python \
python-dev \
libffi \
libffi-dev \
openssl \
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active June 14, 2024 11:02
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@matthewjberger
matthewjberger / instructions.md
Last active June 15, 2024 15:42
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@DiegoSalazar
DiegoSalazar / pre-commit
Created June 15, 2016 17:18
git pre-commit hook to block changes containing the string debug in a ruby comment
#!/bin/sh
. git-sh-setup # for die
git-diff-index -p -M --cached HEAD -- | grep '^+' | grep -n '# debug' && die 'Blocking commit: debug detected in code'
:
@cyrusboadway
cyrusboadway / google-domains-dynamic-dns-update.sh
Created February 20, 2016 17:21
Script to update a Google Domains DNS record
#!/bin/bash
### Google Domains provides an API to update a DNS "Syntheitc record". This script
### updates a record with the script-runner's public IP, as resolved using a DNS
### lookup.
###
### Google Dynamic DNS: https://support.google.com/domains/answer/6147083
### Synthetic Records: https://support.google.com/domains/answer/6069273
USERNAME=""
@chantastic
chantastic / on-jsx.markdown
Last active May 30, 2024 13:11
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {