Skip to content

Instantly share code, notes, and snippets.

View jamessom's full-sized avatar
✔️
Working

Jamessom Queiroz jamessom

✔️
Working
  • Brasilia, Brasil
View GitHub Profile
@jamessom
jamessom / silver.md
Created February 7, 2017 14:47 — forked from sean2121/silver.md

Ruby Association Certified Ruby Examination Silver Sample Questions

Q1. Which of the following have true values in Ruby? (Choose two.)

  • (a) ""
  • (b) 0
  • (c) false
  • (d) nil

@jamessom
jamessom / google-fonts.sh
Created September 4, 2017 01:54 — forked from dyoungwd/google-fonts.sh
Install Google Fonts on fedora
# Original : Michalis Georgiou
# Modified : D4zzy for Fedora
_wgeturl="https://github.com/google/fonts/archive/master.tar.gz"
_gf="google-fonts"
# install wget
echo "Installing wget..."
sudo dnf install wget
@jamessom
jamessom / gems-para-paginacao-rails.md
Last active November 8, 2017 17:31
Lista de Gems para paginação
Watches Stars Forks
125 6,823 904

⚡ A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Ruby webapps

A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for modern web app frameworks and ORMs

@jamessom
jamessom / map-filter-reduce.js
Created February 4, 2018 22:57
test power of map, filter and reduce
const obj = [
{ time: "11:51", title: "Flexbox Video" },
{ time: "11:29", title: "Flexbox Video" },
{ time: "9:13", title: "Flexbox Video" },
{ time: "8:22", title: "Flexbox Video" },
{ time: "8:57", title: "Flexbox Video" },
{ time: "7:12", title: "Flexbox Video" },
{ time: "7:58", title: "Redux Video" },
{ time: "7:24", title: "Redux Video" },
{ time: "6:46", title: "Flexbox Video" },
@jamessom
jamessom / excel-csv-download-slim-php.md
Created March 26, 2018 03:40
Creating and downloading Excel files with Slim

Creating and downloading Excel files with Slim

Maybe you need the possibility to create excel files and automaticly download it.

To be able to create Excel docs I'm using PHPExcel. Here is a tiny example how to create and download the created file directly from your server.

Installation

@jamessom
jamessom / PHPExcel_Basics.md
Created March 26, 2018 04:24 — forked from r-sal/PHPExcel_Basics.md
PHPExcel Notes and code snippets

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

@jamessom
jamessom / faker.js
Created April 3, 2018 20:44
Generating fake data with Faker.js
var faker = require('faker');
var uuidV4 = require('uuid/v4');
var log = {
"v": "1.0",
"category": "ERRORLOG",
"level": "INFO",
"timestamp": "2016-11-04T22:02:02.365Z",
"application": {
"name": "My Fav application",
@jamessom
jamessom / Capybara.md
Created May 15, 2018 00:56 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@jamessom
jamessom / bitbucket-pipelines.yml
Created June 12, 2018 03:36 — forked from mcnamee/bitbucket-pipelines.yml
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables.
# 2. Commit this file to your repo
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initial GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you
@jamessom
jamessom / lumen-app.txt
Created December 21, 2018 18:25
Create Lumen project via Docker
docker run --rm --interactive --tty --volume $PWD:/app composer create-project --prefer-dist laravel/lumen lumen-jwt