Skip to content

Instantly share code, notes, and snippets.

View jorgeavelar's full-sized avatar
💭
I may be slow to respond.

Jorge Avelar jorgeavelar

💭
I may be slow to respond.
  • Minas Gerais, São Paulo, Rio de Janeiro - Brazil
View GitHub Profile

Resumo do problema

(Resumir o bug encontrado claramente)

Dispositivo

(Mobile/Web/PWA)

Passos para reproduzir

(Como se pode reproduzir o problema - isso é muito importante)

Qual é o comportamento atual bug?

@jorgeavelar
jorgeavelar / source.rb
Created February 26, 2021 22:11
Strategy in ruby
module Strategy
def call
raise NotImplementedError.new("method not implemented")
end
end
class Context
attr_reader :instance
def initialize(instance)
#include <stdio.h>
#include <stdlib.h>
int main() {
int num = 0, i = 1;
unsigned long fact = 1;
printf("Enter a number: ");
scanf("%d", &num);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
# define MAX_ATHLETE 4
# define MAX_JUMP 5
typedef struct {
char name[60];
float distances[MAX_JUMP];
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char gender[1];
float height;
} Person;
int total(Person *p, int n, char *gender);
@jorgeavelar
jorgeavelar / emacs
Last active August 29, 2015 14:07
emacs
# list emacs installed
sudo dpkg --get-selections | grep emacs
# install emacs24 on ubuntu 14.04
sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg
# Install apt-get packages:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
# Install chruby:
cd
wget https://github.com/downloads/postmodern/chruby/chruby-0.2.3.tar.gz
tar -xzvf chruby-0.2.3.tar.gz
cd chruby-0.2.3
sudo make install

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

@jorgeavelar
jorgeavelar / setup.md
Last active December 16, 2015 14:08 — forked from georgeredinger/setup.md

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev

@jorgeavelar
jorgeavelar / strni.py
Created December 11, 2012 21:37
String interporlation like Ruby
#!/usr/bin/env python
#_*_ coding: utf-8 _*_
import sys, re
def strni(string):
locals = sys._getframe(1).f_locals
globals = sys._getframe(1).f_globals
for value in re.findall(r'#\{([^{]*)\}', string):