Skip to content

Instantly share code, notes, and snippets.

View cdiaz's full-sized avatar
🏠
Working from home

Cristiam Diaz cdiaz

🏠
Working from home
  • Quantux, @Noders
  • Florencia, Caquetá, Colombia
View GitHub Profile
@bluemix
bluemix / gradient-text-flutter.dart
Last active June 29, 2020 05:56
Creating text gradient in Flutter
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Shader linearGradient = LinearGradient(
@khriztianmoreno
khriztianmoreno / talk-nodeJS-medellin.md
Last active May 21, 2019 17:12
Talk: Estructurando la base de nuestro proyecto

Cada aplicación necesita ajustes de configuración y la mayoría de los lenguajes de programación / ecosistemas tiene algún tipo de soporte y convención por defecto para él.

  • La mayoría de las aplicaciones Java se basan en archivos .properties;
  • .Net tiene sus archivos estándar app.config y web.config;
  • Ruby on Rails carga la configuración desde config/application.rb, Initializers and After-initializers;
  • Node.js no tiene una forma estándar de administrar estos ajustes, pero hay muchas opciones disponibles.

Tabla de Contenido

  1. Overview
  2. Init
@ziluvatar
ziluvatar / token-generator.js
Last active October 24, 2024 04:26
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@jsdevtom
jsdevtom / app-routing.animation.ts
Last active December 23, 2022 17:09
Fade out angular 2 loading page/ Fade in first angular 2 component
import {
trigger,
state,
style,
animate,
transition
} from '@angular/animations';
import { AnimationEntryMetadata } from "@angular/core";
@yosukehasumi
yosukehasumi / git-auto-deploy.md
Last active July 25, 2023 20:07
Setting Up Git-Auto-Deploy on Digital Ocean

Install software-properties-common

sudo apt-get install software-properties-common

Add Repo

sudo add-apt-repository ppa:olipo186/git-auto-deploy
@fredrikaverpil
fredrikaverpil / macOS_compile_PySide.sh
Last active December 18, 2020 21:22
PyQt4 & PyQt5
brew install Qt4
brew install openssl
brew install cmake
git clone https://github.com/PySide/pyside-setup.git --recurse-submodules
cd pyside-setup
# The following must be executed in a bash shell
python setup.py bdist_wheel --ignore-git --qmake=/usr/local/Cellar/qt/4.8.7_2/bin/qmake --openssl=/usr/local/Cellar/openssl/1.0.2h_1/bin/openssl --cmake=/usr/local/Cellar/cmake/3.5.2/bin/cmake
@twolfson
twolfson / README.md
Last active August 1, 2023 10:45
Node.js job queue evaluation

We are building a Node.js service which will need asynchronous support for tasks like sending emails. Here's our evaluation:

@pabloem
pabloem / __init__.py
Created March 3, 2016 02:14
Code for perceptron
# We need this to initialize python packages
@lrhache
lrhache / python-selenium-open-tab.md
Last active July 31, 2024 20:57
Python Selenium - Open new tab / focus tab / close tab

On a recent project, I ran into an issue with Python Selenium webdriver. There's no easy way to open a new tab, grab whatever you need and return to original window opener.

Here's a couple people who ran into the same complication:

So, after many minutes (read about an hour) of searching, I decided to do find a quick solution to this problem.