Skip to content

Instantly share code, notes, and snippets.

View Jayphen's full-sized avatar
🏠
Working from home

Jayphen Jayphen

🏠
Working from home
View GitHub Profile
@adoublef
adoublef / jsx.d.ts
Last active May 15, 2024 11:29
JSX for HTMX
type Booleanish = boolean | "true" | "false";
type CrossOrigin = "anonymous" | "use-credentials" | "" | undefined;
// export = JSX;
// export as namespace JSX;
declare namespace JSX {
interface HTMLProps<T> extends AllHTMLAttributes<T> {}
// type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = E;
@kentcdodds
kentcdodds / package.json
Last active November 20, 2024 12:27
setup script for my workshops
{
"name": "workshop-setup",
"version": "1.0.0",
"description": "This is the common setup script for most of my workshops",
"bin": "./setup.js"
}
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@Cyberek
Cyberek / README.txt
Last active September 9, 2021 00:17
Starting Kodi automatically on Raspbian Jessie and Stretch
So you were able to install Kodi via "sudo apt-get install kodi" but have no idea how to force it to autostart on boot?
You have tried all those googled solutions such as adding kodi-standalone to .bashrc, creating init.d script but nothing worked?
This is the right place to get the answer.
For some reason, the current version of Kodi doesnt provide 2 important files:
/etc/init.d/kodi
/etc/default/kodi
@dphiffer
dphiffer / backup.sh
Created November 30, 2014 03:17
Backup your Mac files, and ignore all the weird hidden stufft
#!/bin/sh
# backup.sh
# Incrementally backup the enclosing folder
# Set this to where you want your files to get backed up to (include a trailing
# slash). This follows the same format as ssh, but you can also use a local
# file path here.
TARGET="[email protected]:/volume1/backups/dphiffer/"
@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active February 20, 2025 09:37
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active November 27, 2024 13:36
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@patsch
patsch / MountainLion-Java-Applet-Plugin.txt
Created October 24, 2012 23:47
Problems with the ATO Business Portal (or other Java Applets) & Mountain Lion's latest Java Update - this may help
After I applied the latest Apple Security Update around October 20th 2012 my Java Applets would no longer work;
in particular the ATO Business Portal which I need to submit quarterly data to the Australian Taxation Office.
When using Safari I always got a "Missing Plugin" error - even after I "Enabled Java" in the Security Preferences of Safari.
I confirmed that my Java version was up to date by running:
java -version
which gave me:
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 20, 2025 21:15
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 20, 2025 21:04
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname