Skip to content

Instantly share code, notes, and snippets.

View coelhoadler's full-sized avatar
🎯
Focusing

Adler Santos coelhoadler

🎯
Focusing
View GitHub Profile
@coelhoadler
coelhoadler / script.js
Last active August 24, 2019 20:25
Script para integração do Google Spreadsheets junto com o Firebase
//Add in your database secret
var secret = 'UjLXXDC5uGWBmhh4XRvLM4AaeK0igaswEB4Lc4K8'
function getFirebaseUrl(jsonPath) {
/*
We then make a URL builder
This takes in a path, and
returns a URL that updates the data in that path
*/
return (
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@coelhoadler
coelhoadler / snippet_component_karma.json
Last active August 21, 2018 14:24
Create a blank karma component body
"Print karma component body": {
"prefix": "kacom",
"body": [
"import { ComponentFixture, TestBed } from '@angular/core/testing';",
"import { RouterTestingModule } from '@angular/router/testing';",
"import { HttpClientTestingModule } from '@angular/common/http/testing'; \n",
"describe('$1', () => {",
"\tlet fixture: ComponentFixture<$1>;",
"\tlet component: $1; \n",
@coelhoadler
coelhoadler / javascript.json
Created July 22, 2018 17:19
Creating a snippet for .js extension for visual studio code GUI
"Create stateless react component": {
"prefix": "rsa",
"body": [
"import React from 'react'; \n",
"const ${1:Component_Name} = () => { \n",
"\treturn ($0) \n",
"}",
"export default ${1:Component_Name};"
],
"description": "Create stateless react component"
@coelhoadler
coelhoadler / changeVisibilityBrowserTab.html
Created March 19, 2018 15:37
Testing the visibility API. Every time when I change the browser tab, the title page is changed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>🌍</title>
</head>
<body>
@coelhoadler
coelhoadler / environment-dev-adler.sh
Last active August 5, 2018 11:38
[WIP] Starting a .sh file to automate my developer environment.
#!/bin/bash
verify_git() {
git --version
}
add_alias_git() {
if [ "$#" -eq 1]
then
alias gst='git status' >> $1
function async() {
return new Promise( (resolve, reject) => {
setTimeout(() => {
resolve({'message' : 'deu certo'});
}, 2000)
});
}
function noAsync() {
console.log('Função não assíncrona.')
@coelhoadler
coelhoadler / electron-packager.js
Created September 23, 2017 14:10
electron-packager nº 2
"use strict";
var packager = require('electron-packager');
const pkg = require('./package.json');
const argv = require('minimist')(process.argv.slice(1));
const platform = (argv.platform) || 'darwin';
const aux_platform = (platform == "darwin") ? "mac" : (platform == "win32") ? "win" : platform;
const arch = argv.arch || 'all';
const appName = argv.name || pkg.version + "-" + aux_platform;
@coelhoadler
coelhoadler / package.json
Last active October 15, 2017 11:38
electron-packager nº 1
{
"name": "electron-packager",
"version": "0.0.1",
"description": "",
"main": "main.js",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron . --develop true",
"build:mac": "node electron-packager.js --develop false --asar --platform=darwin --arch=x64 --icon=./src/assets/icons/mac/logotipo.icns",
@coelhoadler
coelhoadler / git__alias.md
Created August 31, 2017 13:15
Alias for Git.

All you have to do is type "alias [shortcut]='[original command]'

Here's a list of general ones I have set up for Git. You could copy and paste these directly or make your own.

alias gst='git status'
alias gc='git commit'
alias gco='git checkout'
alias gl='git pull'
alias gpom="git pull origin master"