Skip to content

Instantly share code, notes, and snippets.

View CarlosACepeda's full-sized avatar
🏍️
Riding my bike

Carlos Cepeda CarlosACepeda

🏍️
Riding my bike
  • UndergroundDev
  • Bogotá, Colombia
View GitHub Profile
@driescroons
driescroons / readme.md
Last active April 24, 2024 00:02
Copy projects without node modules on windows

Copy projects without node modules on windows

Create a exclude.txt and paste the following.

node_modules

You can also add additional folders. The following example was my exclude.txt

node_modules
.parcel-cache
@rudchenkos
rudchenkos / CenterCropDrawable.java
Created July 14, 2017 12:47
Maintain aspect ratio of bitmap drawables set as windowBackground on Android
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
package pl.pszklarska.leakexample;
import android.content.Context;
import android.widget.Toast;
public class StaticContextLeak {
private static Context context;
public void setContext(final Context context) {
@jemshit
jemshit / text_colors.xml
Last active March 21, 2021 01:07
Android Text Colors according to Material Design Pattern
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Dark Text Color for Light Background -->
<color name="textDarkPrimary">#DE000000</color> <!--DE for %87 opacity-->
<color name="textDarkSecondary">#8A000000</color> <!--8A for %54 opacity-->
<color name="textDarkDisabled">#61000000</color> <!--61 for %38 opacity-->
<!-- White Text Color for Dark Background -->
<color name="textLightPrimary">#FFFFFF</color> <!--%100 opacity-->

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 12, 2024 01:58
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@aras-p
aras-p / preprocessor_fun.h
Last active May 13, 2024 15:42
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@webdestroya
webdestroya / RichardIsAFuckingIdiot.cs
Created January 4, 2012 01:27
RichardIsAFuckingIdiot
//Code sanitized to protect the foolish.
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web.UI;
namespace Mobile.Web.Control
{
/// <summary>