Skip to content

Instantly share code, notes, and snippets.

View brunogarcia's full-sized avatar
📚
Always learning

Bruno brunogarcia

📚
Always learning
View GitHub Profile
I am attesting that this GitHub handle brunogarcia is linked to the Tezos account tz29WSy51ynZQ49YrQVZS2Ws4Ry4wPGQ4nNH for tzprofiles
sig:spsig15pmYEzTzwBt8v3KFJhdYuXANFSyFqWTrEZtu7GQLczb9bA6hgxfvASFL2fVAU1DjS8C5LJ73rSwQnc6wvGBkoExhZSySJ
@brunogarcia
brunogarcia / polling-typescript.ts
Last active August 31, 2022 14:32
Polling implementation in Typescript
type Fn<T> = (payload: any) => T
type PromiseFn<T> = () => Promise<T>
type Options = {
maxAttempts?: number,
timeout?: number,
delta?: number,
validate?: Fn<boolean> | null,
}
/**
@brunogarcia
brunogarcia / machine.js
Created December 2, 2021 09:18
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@brunogarcia
brunogarcia / Dev-tools-for-Ubuntu.sh
Last active November 23, 2021 10:41
Linux Front-end Tools
###############
# GIT
###############
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y git
# Configuration
$ nano ~/.gitconfig
@brunogarcia
brunogarcia / es5-subclasses.js
Last active April 30, 2018 15:36
ES6/ES5 subclasses
// ### Psuedoclassical Subclassing ###
// This combines the name defined by `class` with the code defined in `constructor`:
function Tree(size, leaves) {
this.size = (typeof size === "undefined")? 10 : size;
const defaultLeaves = {spring: 'green', summer: 'green', fall: 'orange', winter: null};
this.leaves = (typeof leaves === "undefined")? defaultLeaves : leaves;
this.leafColor = null;
}
// The "instance" method:
- sudo apt-get update
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
- sudo update-alternatives --config java
- java -version
@brunogarcia
brunogarcia / codelite.md
Last active October 9, 2017 16:51
Codelite Configuration

Bin

  • Create bin folder
  • Go to Settings/General and update:
    • Output file: /bin/$(ProjectName)
    • Working directory: /bin
  • Test it!

Source

  • Delete main.c
  • Create source folder
<!--CSS-->
<link href="/app/web/css/main_style_1.css" rel="stylesheet" type="text/css" />
<link href="/app/web/css/plugins_part_1_font-awesome_1.css" rel="stylesheet" type="text/css" />
<link href="/app/web/css/plugins_part_1_bootstrap-datepicker_2.css" rel="stylesheet" type="text/css" />
<link href="/app/web/css/plugins_part_1_bootstrap-tags-input_3.css" rel="stylesheet" type="text/css" />
<link href="/app/web/css/plugins_part_1_bootstrap-sweet-alert_4.css" rel="stylesheet" type="text/css" />
<!--JS-->
<script src="/app/web/js/main_jquery_1.js" type="text/javascript"></script>
<script src="/app/web/js/main_bootstrap_2.js" type="text/javascript"></script>
<!--CSS-->
<link href="/app/web/css/main.css" rel="stylesheet" type="text/css" />
<link href="/app/web/css/plugins.css" rel="stylesheet" type="text/css" />
<!--JS-->
<script src="/app/web/js/main.js" type="text/javascript"></script>
@brunogarcia
brunogarcia / myComponent.scss
Created August 12, 2016 07:45
CSS Modules + composes
// myComponent.scss
.myStyle {
composes: some-helper from '_helpers.scss';
}
// _helpers.scss
.some-helper {
color: red
}