Skip to content

Instantly share code, notes, and snippets.

View sgnl's full-sized avatar
🍪
Do you agree to share your cookies?

Ray Farias sgnl

🍪
Do you agree to share your cookies?
  • Honolulu, Hawaii
View GitHub Profile
@sgnl
sgnl / postgres-brew.md
Last active April 21, 2024 23:18
Installing Postgres via Brew (OSX) (outdated see top most note)

Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.

new out put may look like

To have launchd start postgresql now and restart at login:
  brew services start postgresql
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgres start
@sgnl
sgnl / throwing-darts.md
Last active November 27, 2023 04:15
Throwing Darts

Throwing Darts

You've just recently been hired to calculate scores for a Dart Board game

Scoring Specs

  • 0 points: radius above 10
  • 5 points: radius between 5 and 10 inclusive
  • 10 points: radius less than 5

Some specifications to follow

  • An empty collection should return -1.
@sgnl
sgnl / installfest.md
Last active November 18, 2023 01:36
Dev league Day 0 Installfest

Install Fest

If you have already installed any of these programs before, then you may skip it.

iTerm2(osx)

  • Linux flavors can use instead use the Terminal application that comes installed.

Scroll to the bottom of the page and find the install code for your operating system:

  • OSX: follow the instructions in the via curl tab
@sgnl
sgnl / add-upstream.md
Last active October 3, 2023 22:51
So you've forked a Repository and you want updates...

#tl;dr

setting up a branch to track a repo

pre: assuming you have forked a repo and cloned your fork to your computer

  1. git remote add [maintainer's name] [paste URL here]
  2. git fetch --all
  3. git branch --track [maintainer's name]_[branch] [remote name from step 1]/[branch you want to track] At this point you may watch to checkout to your newly create branch and issue a git pull command.
@sgnl
sgnl / serverCodes.md
Last active June 24, 2023 07:07
status codes

1xx: Information

Code Message Description
100 Continue The server has received the request headers, and the client should proceed to send the request body
101 Switching Protocols The requester has asked the server to switch protocols
103 Checkpoint Used in the resumable requests proposal to resume aborted PUT or POST requests

2xx: Successful

Code Message Description
@sgnl
sgnl / README.md
Last active November 9, 2022 21:48
Setting up SASS (SCSS) files with gulp, gulp-sass, and Browser Sync!

Create a new temp project

  1. $ mkdir sass_gulp_workshop
  2. cd into the new directory
  3. Initialize NPM: $ npm init --yes
  4. Install gulp and gulp-sass packages: $ npm install -D gulp gulp-sass browser-sync
  5. Update package.json's scripts section with this key-value pair: "scripts": { "dev": "gulp" }
  6. Recreate this file structure in this directory:
  • public (directory)
    • css (directory)
    • index.html (file)
@sgnl
sgnl / _notes.md
Last active August 26, 2022 03:03
AJAX with Vanilla Javascript. (XMLHttpRequest)

Short XHR Examples

Examples shown are bare minimum needed to achieve a simple goal.

Resources

  • Google Chrome's Dev Tools' Network Panel c-c-c-c-c-ULTIMATE c-c-c-COMBO!!!
  • requestb.in enpoints for your HTTP Requests as a free service.
@sgnl
sgnl / semanticHTML.md
Last active February 28, 2022 03:46
Semantic-correct HTML

Semantically-correct HTML

Semantic - fancy word for 'meaning'

There are three layers in the web browser:

  1. HTML - Structure layer

  2. CSS - Style or Presentation layer

@sgnl
sgnl / README.md
Last active February 10, 2022 11:25
Telegraf MySQL Plugin Installation Guide

Overview

The [MySQL Input Plugin][8] for Telegraf gathers data from a MySQL server.

Setup

Create user for the Telegraf agent to connect with

For connections that are local to the MySQL server, use localhost as your hostname:

Keybase proof

I hereby claim:

  • I am sgnl on github.
  • I am sgnl (https://keybase.io/sgnl) on keybase.
  • I have a public key ASDIs__WPhdiU_6GI9-vhTAff-pwxdo-OAzH5mt3p8wg9go

To claim this, I am signing this object: