Skip to content

Instantly share code, notes, and snippets.

View mrcsxsiq's full-sized avatar
🚀
I do computer stuff

Marcos Paulo Farias mrcsxsiq

🚀
I do computer stuff
View GitHub Profile
@mrcsxsiq
mrcsxsiq / QuickUnionPathCompressionUF.java
Created July 15, 2022 20:13
Union Find Path Compression
public class QuickUnionPathCompressionUF {
private int[] id;
private int count;
public QuickUnionPathCompressionUF(int n) {
count = n;
id = new int[n];
for (int i = 0; i < n; i++) {
id[i] = i;
}
@mrcsxsiq
mrcsxsiq / home.json
Last active April 29, 2021 16:22
KT Podcast
{
"featured":[
{
"title":"Now in Android",
"description":"",
"image":"https://user-images.githubusercontent.com/993608/115976519-43938580-a545-11eb-934b-9909549212e7.png",
"rss":"http://nowinandroid.googledevelopers.libsynpro.com/rss"
},
{
"title":"Fragmented",
@mrcsxsiq
mrcsxsiq / gist:33b991d34c2354db335328f99aa13ece
Created May 30, 2020 15:28 — forked from rmatil/gist:8d21620c11039a442964
Connect MySQL database in Vagrant VM from Host machine

Connecting to Vagrant VM MySQL database from host

This gist shows how to connect to your vagrant MySQL database from the host machine.

Change Address Binding from MySQL

  • Connect to vagrant using vagrant ssh
  • Edit file /etc/mysql/my.cnf:
    • Change parameter bind-address to 0.0.0.0 to allow all incoming connection attempts
@mrcsxsiq
mrcsxsiq / pokemon.json
Created December 27, 2019 01:46
List of pokemon
[
{
"name": "Bulbasaur",
"id": "#001",
"imageurl": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/001.png",
"xdescription": "Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.",
"ydescription": "Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.",
"height": "2' 04\"",
"category": "Seed",
"weight": "15.2 lbs",
@mrcsxsiq
mrcsxsiq / pokemon.json
Created December 23, 2019 16:52 — forked from npentrel/pokemon.json
A JSON document that uses data from the pokeapi.co. It is formatted to allows for easy importing into MongoDB.
{"_id":"557a723880a20c9db3bc31c2","pkdx_id":1,"national_id":1,"name":"Bulbasaur","__v":3,"image_url":"http://pokeapi.co/media/img/1.png","description":"Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger. Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.","art_url":"http://assets22.pokemon.com/assets/cms2/img/pokedex/full/001.png","types":["poison","grass"],"evolutions":[{"level":16,"method":"level_up","to":"Ivysaur","_id":"557a723880a20c9db3bc31c3"}]}
{"_id":"557a723980a20c9db3bc31e3","pkdx_id":2,"national_id":2,"name":"Ivysaur","__v":4,"image_url":"http://pokeapi.co/media/img/2.png","description":"There is a bud on this Pokémon's back. To support its weight, Ivysaur's legs and trunk grow thick and strong. If it starts spending more time lying in the sunlight, it's a sign that the bud will bloom into a large flower soon.
@mrcsxsiq
mrcsxsiq / estados-cidades.json
Created July 26, 2018 22:49 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@mrcsxsiq
mrcsxsiq / node-npm-install.md
Created June 29, 2018 22:42 — forked from rcugut/node-npm-install.md
Install node & npm on Mac OS X with Homebrew

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.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@mrcsxsiq
mrcsxsiq / gist:b82bae1a2f95af0720bab732524c0788
Created January 21, 2018 16:23 — forked from chrissimpkins/gist:5bf5686bae86b8129bee
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@mrcsxsiq
mrcsxsiq / atom touchbar-utility configuration
Created January 21, 2018 16:19
~/.atom/packages/touchbar-utility/lib/configuration.js
exports.configuration = [{
type: 'button',
label: '//',
clickDispatchAction: 'editor:toggle-line-comments',
},
{
type: 'button',
label: '💅',
clickDispatchAction: 'atom-beautify:beautify-editor'
},
@mrcsxsiq
mrcsxsiq / gist:877a9261cc31cd79690a0e7b35c67120
Created October 10, 2017 22:06 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: