Skip to content

Instantly share code, notes, and snippets.

View rich-97's full-sized avatar
🏠
Working from home

Ricardo Moreno rich-97

🏠
Working from home
View GitHub Profile
@Klerith
Klerith / plugins.md
Last active August 26, 2024 00:18
Flutter: Curso de Flutter - Instalaciones recomendadas

Programas

git config --global user.name "Tu nombre"
git config --global user.email "Tu correo"
@carlosazaustre
carlosazaustre / app.js
Created February 9, 2017 23:26
Guía React
class Empleado extends React.Component {
render () {
return (
<li>
{this.props.nombre} - {this.props.email}
</li>
);
}
}
@rich-97
rich-97 / filter.js
Last active June 10, 2021 14:21
Example of pattern design oriented object in JavaScript.
$(document).ready(function () {
var $btn = $('.btn');
var $image = $('#img');
function Filter (config) {
this.target = config.target;
this.image = config.image;
this.filters = config.filters;
this.support = config.support === undefined ? true : config.support;
@amstee
amstee / exercise-sqrt.go
Last active January 15, 2017 00:09
An answer for the exercise sqrt
func Sqrt(x float64) (z float64) {
z = 1.0
for i := 0; i < 20; i++ {
z = z - (z * z - x) / (2 * z)
}
return z
}
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@CharlyJazz
CharlyJazz / fibonacci-midi.py
Created October 29, 2016 01:23
Python - Generator that creates the fibonacci sequence and then becomes dodecafonism song
from __future__ import division
from itertools import chain
from pyknon.genmidi import Midi
from pyknon.music import Note, NoteSeq
def fib(n):
a, b = 0, 1
fibo = [a, b]
while b < n:
@BeMg
BeMg / perfect.c
Created January 13, 2016 08:32
perfect
#include <stdio.h>
#include <stdlib.h>
int ans(int n){
int sum=0;
for(int i=1; i<n; i++){
if(n%i==0){
sum+=i;
}
if(sum>n)
@apolloclark
apolloclark / postgres cheatsheet.md
Last active June 14, 2024 08:25
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@agentgt
agentgt / eclipse-one-dark-like.xml
Last active July 4, 2024 00:53
One Dark Atom Theme for Eclipse for the Eclipse Color Theme plugin
<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="9999" name="One Dark Like" modified="2015-09-01 19:55:49" author="Adam Gent" website="http://snaphop.com">
<searchResultIndication color="#E5C07B" />
<filteredSearchResultIndication color="#E5C07B" />
<occurrenceIndication color="#4B4E55" />
<writeOccurrenceIndication color="#4B4E55" />
<findScope color="#4B4E55" />
<deletionIndication color="#DF5F5F" />
<sourceHoverBackground color="#4B4E55" />
<singleLineComment color="#969896" italic="false" />