Skip to content

Instantly share code, notes, and snippets.

View favasconcelos's full-sized avatar
🇧🇷
(:

Felipe Vasconcelos favasconcelos

🇧🇷
(:
View GitHub Profile
upstream node_server {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
@favasconcelos
favasconcelos / ..backend_dot_files
Last active January 10, 2020 22:32
Bakckend project configs files.
..
@favasconcelos
favasconcelos / cloudSettings
Last active February 29, 2020 10:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-29T10:58:46.320Z","extensionVersion":"v3.4.3"}
@josephrace
josephrace / .gitlab-ci.yml
Created May 18, 2017 17:44
Configuration file for create-react-app on GitLab Pages
image: node:7.9.0 # change to match your node version
cache:
paths:
- node_modules/
before_script:
- npm install
test:
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@souporserious
souporserious / react-scrollspy.js
Last active May 2, 2021 06:24
Two simple components to build a ScrollSpy in React
import React, { Component, PropTypes, createElement } from 'react'
import { findDOMNode } from 'react-dom'
// usage:
// import { ScrollSpy, Link } = './wherever-this-file-is'
//
// <ScrollSpy>
// <Link ref={c => this._firstLink = c} section="1">Section 1</Link>
// <Link section="2">Section 2</Link>
// <Link section="3">Section 3</Link>
@mobiRic
mobiRic / EmptyRecyclerView.java
Last active April 25, 2023 18:35 — forked from henningta/EmptyRecyclerView.java
RecyclerView doesn't have an emptyView support, we gotta fix that
/*
* Copyright (C) 2015 Glowworm Software
* Copyright (C) 2014 Nizamutdinov Adel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@alexandrepossebom
alexandrepossebom / build.gradle
Created November 13, 2014 12:24
Gradle with static analysis tools (PMD,Findbugs,Lint) to use with Jenkins CI
apply plugin: 'com.android.application'
apply plugin: 'pmd'
apply plugin: 'findbugs'
android {
compileSdkVersion 21
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.possebom.coritibawidget"
@akirahrkw
akirahrkw / gist:ce3c52ae79f3b5de5a01
Created October 31, 2014 17:09
manipulate pixel data by swift
class BaseImageProcessor {
func createARGBBitmapContext(imageRef : CGImageRef) -> CGContextRef! {
var pixelWidth:UInt = CGImageGetWidth(imageRef);
var pixelHeight:UInt = CGImageGetHeight(imageRef);
var bitmapBytesPerRow:UInt = (pixelWidth * 4)
var bitmapByteCount:UInt = (bitmapBytesPerRow * pixelHeight)
var colorSpace:CGColorSpace = CGColorSpaceCreateDeviceRGB()