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
@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
@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(
@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
@pabloem
pabloem / __init__.py
Created March 3, 2016 02:14
Code for perceptron
# We need this to initialize python packages
@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";
@lrhache
lrhache / python-selenium-open-tab.md
Last active June 10, 2023 13:49
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.

@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
@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:

@jelcaf
jelcaf / Operaciones-Git
Last active August 14, 2023 22:50
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
@marvin
marvin / client.py
Created December 17, 2012 13:50
simple python client/server socket binary stream
import socket
HOST = 'localhost'
PORT = 9876
ADDR = (HOST,PORT)
BUFSIZE = 4096
videofile = "videos/royalty-free_footage_wien_18_640x360.mp4"
bytes = open(videofile).read()