Skip to content

Instantly share code, notes, and snippets.

View barryblando's full-sized avatar

Retr0_0x315 barryblando

View GitHub Profile
@barryblando
barryblando / uninstall_command.md
Created September 1, 2022 03:59
Uninstall Command.md

Uninstall git

To remove just git package itself from Ubuntu 14.04 execute on terminal:

$ sudo apt-get remove git

Uninstall git and it's dependent packages

To remove the git package and any other dependant package which are no longer needed from Ubuntu Trusty.

$ sudo apt-get remove --auto-remove git
@barryblando
barryblando / setup_git_ssh.md
Last active January 27, 2020 06:24
Configuring Git via SSH

If you don't already have a Github account, make sure to register. It will come in handy for the future.

Replace my name and email address in the following steps with the ones you used for your Github account.

git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR@EMAIL.com"
ssh-keygen -t rsa -b 4096 -C "YOUR@EMAIL.com"
@barryblando
barryblando / 📊 Weekly development breakdown
Last active March 24, 2023 01:24
📊 Weekly development breakdown
Go 17 hrs 24 mins ███████████████████▌░ 93.2%
Lua 1 hr 8 mins █▎░░░░░░░░░░░░░░░░░░░ 6.1%
TypeScript 2 mins ░░░░░░░░░░░░░░░░░░░░░ 0.2%
Markdown 1 min ░░░░░░░░░░░░░░░░░░░░░ 0.2%
Other 1 min ░░░░░░░░░░░░░░░░░░░░░ 0.1%
@barryblando
barryblando / postgre-cheatsheet.md
Last active May 13, 2020 01:52
PostgreSQL CheatSheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@barryblando
barryblando / autocomplete.jsx
Created April 2, 2019 09:15
Rxjs + Downshift Autocomplete
import React from 'react';
import Downshift from 'downshift';
import Rx from 'rxjs';
import { ajax } from 'rxjs/observable/dom/ajax';
const makeUrl = search =>
`https://en.wikipedia.org/w/api.php?action=query&format=json&list=search&utf8=1&srsearch=${encodeURIComponent(str)}`;
const input$ = new Rx.Subject();
// PS. This is cool for play, but always remember that code is for human consumption.
// Especially the use of lambdas in the second example gets confusing fast.
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions lambdas. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// Type this in your code to break chrome debugger in that line.
@barryblando
barryblando / workspacesetting.md
Last active January 4, 2019 01:59
VSCODE Workspace

VSCODE WORKSPACE SETTING FOR REACT w/ ESLINT + PRETTIER

ESLINT

{
  "extends": [
    "airbnb",
    "prettier",
    "prettier/react"
@barryblando
barryblando / scss.md
Created January 3, 2019 03:17
Advanced SCSS

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the awesome CSS extensions you've always wished you had:

  • [
@barryblando
barryblando / css-media-query.md
Last active January 3, 2019 03:15
CSS media query rules - Easy to understand

CSS Media Queries: Best Practices