Skip to content

Instantly share code, notes, and snippets.

View thefonso's full-sized avatar

thefonso thefonso

View GitHub Profile
@thefonso
thefonso / gitconfig.md
Created April 12, 2026 20:46
new gitconfig

[merge] tool = meld

[alias] st = status co = checkout aa = add . br = branch cm = commit -m remote = remote -v

@thefonso
thefonso / postgresql_plus_arch-linux.md
Created April 12, 2026 00:25 — forked from NickMcSweeney/postgresql_plus_arch-linux.md
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source

@thefonso
thefonso / vpn.md
Created September 22, 2023 22:39 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

GraphQL Queries & Mutations

These are the GraphQL queries and mutations for the YouTube course.

Get names of all clients

{
  clients {
    name
 }
@thefonso
thefonso / indium_emacs_debugging.md
Created January 25, 2023 21:14
emacs debugging with indium

EMACS JS DEBUGGING WITH INDIUM

  1. indium requires a config file to be setup .indium.json
  2. M-x indium-launch

The .indium.json file can contain as many configurations as needed, and mix any supported configuration types.

The currently supported type values are "chrome" and "node".

The root directory of the source files is by default set to the directory where this .indium.json file is placed, but it can be overridden with the root (or the webRoot alias) option:

@thefonso
thefonso / spacemacs-cheatsheet.md
Created August 14, 2022 01:42 — forked from heroheman/spacemacs-cheatsheet.md
Spacemacs Cheatsheet - A cheat sheet for my most common shortcuts in Spacemacs

General

Shortcut Description
SPC f e d Open Configuration
SPC f e R Reload Configuration
SPC SPC Search Emacs
SPC h SPC Search Spacemacs Layer
SPC f s Save Buffer
SPC q q Quit Emacs w/ Prompt
SPC q Q Quit Emacs w/o Prompt
@thefonso
thefonso / reduce.js
Last active June 10, 2022 17:09
Reduce line break down for student
// Run as "node reduce.js"
// the same function is repeated in different form below
// understand how each version of the function below works
//
// NOTE: .max and the spread opperator ...
//
// https://www.w3schools.com/jsref/jsref_max.asp
const flips = [
{id:250},
@thefonso
thefonso / spacemacs_cheatsheet.txt
Created May 1, 2022 01:41
spacemacs cheat sheet
//from http://www.saltycrane.com/blog/2015/12/switching-emacs-vim-actually-spacemacs/
Useful Spacemacs commands
SPC q q - quit
SPC w / - split window vertically
SPC w - - split window horizontally
SPC 1 - switch to window 1
SPC 2 - switch to window 2
SPC w c - delete current window

Open shell (command+shift+s)

Type kill 1

Everyone will be kicked off