Skip to content

Instantly share code, notes, and snippets.

View javascripto's full-sized avatar
:octocat:
Focusing

Yuri Alves javascripto

:octocat:
Focusing
View GitHub Profile
@fontenele
fontenele / Composer-Satis
Created February 13, 2015 18:54
Como criar um servidor Composer privado para hospedar seus projetos/componentes
Vamos criar um servidor Composer privado utilizando nossos repositórios svn como componentes/projetos.
Vamos usar como exemplo o caminho: /var/www/composer-server
URL do nosso server: http://composer.meuhost.com.br:4680
E os componentes/projetos:
http://svn.meuhost.com.br/gerador-pdf/trunk
http://svn.meuhost.com.br/rest-client/trunk
https://github.com/Seldaek/monolog/
#################
@kkas
kkas / new_gist_file_0.md
Last active June 8, 2022 18:13
Website Performance Optimization (Note to myself)Some are taken from the online courses and some are taken from the links.

Website Performance Optimization

Why should I profile the site on my phone?

  • Mobile phones on the other hand are much more resource constrained: slower CPUs, less RAM and GPU memory, higher connection latencies, and so on. As a result, you should always try to profile and debug your site on mobile hardware to get a better and closer picture of how your users will experience your site on their handset.

Critical Rendering Path

https://developers.google.com/web/fundamentals/performance/critical-rendering-path/?hl=en

  • is the sequence of steps that the browsers go through to convert the HTML, CSS, and JavaScript into actual pixels on the screen.
  • if we can optimize this, then we can make our pages render fast, which makes for happier users.
@EtienneR
EtienneR / user.js
Created January 7, 2016 23:39
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
/* file:///Users/henryhuman/Documents/04_Business/Bootstrap%20Creative/GitHub%20repositories/bootstrap-classes-list/bootstrap4.5.0.html */
.accordion
.active
.alert
.alert-danger
.alert-dark
.alert-dismissible
.alert-heading
.alert-info
@thcipriani
thcipriani / progress.sh
Last active December 22, 2021 23:40
A simple(ish) progress bar in bash
#!/usr/bin/env bash
# Fancy progress bar, in bash!
TOTAL=100
DELAY=0.1
PROGRESS=
get_progress() {
@scokmen
scokmen / HttpStatusCode.ts
Created April 25, 2017 11:10
Typescript Http Status Codes Enum
"use strict";
/**
* Hypertext Transfer Protocol (HTTP) response status codes.
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
*/
enum HttpStatusCode {
/**
* The server has received the request headers and the client should proceed to send the request body
@juanarbol
juanarbol / chmodCheatSheet.md
Last active July 15, 2026 00:18
Chmod cheat sheet

Chmod codes cheat sheet

How to use chmod codes in UNIX:

  1. There are three types of permissions in files and folders in unix
    1. Read (r)
    2. Write (w)
    3. Execute (x)
  2. And, there is a classification of users called UGO (explained bellow):
  3. U ~> User (usually, you)
@grupocitar
grupocitar / tests_backend.md
Last active March 4, 2019 07:28
Test Backend

O que nós buscamos

  • Responsável por desenvolver, testar e documentar rotinas;
  • Atuar em implementações, melhorias de performance e integrações;
  • Desenvolver códigos bem estruturados utilizando boas práticas de programação;
  • Realizar revisão por pares dos artefatos de programação;
  • Interagir com todo o time Scrum de forma construtiva na busca por resultados que agreguem valor aos clientes;
  • Construir código com testes automatizados/unitários para garantir a qualidade.

Requisitos e diferenciais das vagas

O que nós buscamos

  • Responsável por desenvolver, testar e documentar rotinas;
  • Atuar em implementações, melhorias de performance e integrações;
  • Desenvolver códigos bem estruturados utilizando boas práticas de programação;
  • Realizar revisão por pares dos artefatos de programação;
  • Interagir com todo o time Scrum de forma construtiva na busca por resultados que agreguem valor aos clientes;
  • Construir código com testes automatizados/unitários para garantir a qualidade.

Requisitos e diferenciais das vagas

@luan0ap
luan0ap / pick.js
Created December 4, 2018 17:00
pick a properties from object, by an array
const pick = (obj = {}) => (props = []) => {
var picked = {}
props.forEach((prop) => picked[prop] = obj[prop])
return picked
}
const lunch = {