Skip to content

Instantly share code, notes, and snippets.

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

Felipe Vasconcelos favasconcelos

🇧🇷
(:
View GitHub Profile
@krshnpatel
krshnpatel / Git Sync Local Branches with Remote.md
Last active October 17, 2024 10:56
A simple script to help you sync your local branches with your remote branches.

Overview

Description

This script allows you to sync your local branches with your remote branches. It would detect any local branches that have been deleted on your remote repository. Any local branches that have not been pushed to remote will not be detected because they might be your "work in progress" branches.

NOTE: If you create a local branch, then push it to your remote repository, then you manually delete that branch on your remote repository. This script will detect that local branch. So I would suggest reading the list of branches marked for deletion before allowing this script to delete them.

Purpose

Usually it's a good practice to delete your remote branch after it has been merged to your default branch (i.e. main, master). However, this means that there will be several stale local branches and these will accumulate over time. Essentially, this script will help you delete those stale local branches which have been deleted on the remote repository.

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"