Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Juan Roa roadev

🎯
Focusing
View GitHub Profile
View any
bVXkiypFhqQ84sC9gTdrEj16TyQqK39XPG
View testnet
0x4331bBE946B10428e7a2d57838443a527e2f6f55
@roadev
roadev / gist:397d669f3c391fd31f81c6edaeec1f7e
Created Mar 29, 2017 — forked from incredimike/variousCountryListFormats.js
Country list as javascript array (alphabetical)
View gist:397d669f3c391fd31f81c6edaeec1f7e
// This needs tidied up before production TODO
var country_list = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua & Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas"
,"Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia & Herzegovina","Botswana","Brazil","British Virgin Islands"
,"Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica"
,"Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea"
,"Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana"
,"Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","G
View write_rg_csv.rb
CSV.open("file.csv", "wb") do |csv|
csv << ["Name", "Phone"]
people = Person.by_role("assistant").by_gender("f").by_days("vs")
people.each do |p|
p.phone[5..9] = "xxxxx"
csv << [p.name, p.phone]
end
people = Person.by_role("assistant").by_gender("f").by_days("s")
people.each do |p|
csv << [p.name, p.phone]
@roadev
roadev / grid.css
Created Jan 14, 2017
flexbox based grid
View grid.css
.col-0, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
flex: 0 0 auto;
padding: 0 1% 0 1%;
}
.container {
View import_csv_rg_mailer.rb
require 'csv'
CSV.foreach('app/services/rg_list.csv', headers: true) do |row|
Person.find_or_create_by name: row['Name'].to_s.split.map(&:capitalize).join(' '), email: row['Email'].to_s.downcase, gender: row['Gender'].to_s.downcase
end
CSV.foreach('app/services/rg17_register_full.csv', headers: true) do |row|
Person.find_or_create_by name: row['Name'].to_s.split.map(&:capitalize).join(' '), email: row['Email'].to_s.downcase.strip, gender: row['Gender'].to_s.downcase, register_date: row['register_date'].to_s.downcase, birth_date: row['birth_date'].to_s, phone: row['phone'].to_s.downcase.strip, level: row['level'].to_s.downcase, motivation: row['motivation'].to_s.downcase, heard_ror: row['heard_ror'].to_s.downcase, laptop: row['laptop'].to_s.downcase, so: row['so'].to_s.downcase, expectation: row['expectation'].to_s.downcase, how_did_you_find_it: row['how_did_you_find_it'].to_s.downcase
end
@roadev
roadev / Dockerfile
Created Sep 19, 2016
Dockerfile for building magento 1.x development environment
View Dockerfile
FROM php:5.6-apache
RUN apt-get update && apt-get install -y \
libmcrypt-dev \
libxml2-dev \
libpng12-dev \
libjpeg-dev
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install mcrypt
RUN docker-php-ext-install soap
View Social Flip Cards.markdown
View Space Invaders Game ( 404 ).markdown
@roadev
roadev / bluetooth_serial.md
Last active Apr 1, 2016 — forked from 0/bluetooth_serial.md
Connecting a Bluetooth device for serial communication on Arch Linux.
View bluetooth_serial.md

The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.

Prerequisites

The following packages are required:

  • bluez: bluetoothd
  • bluez-utils: bluetoothctl, rfcomm