Skip to content

Instantly share code, notes, and snippets.

View castrors's full-sized avatar
😍
Studying Flutter

Rodrigo Castro castrors

😍
Studying Flutter
View GitHub Profile
@castrors
castrors / android_material_pencil_install
Last active November 4, 2015 01:27
How to install the stencils collections in your Pencil to use Android material design and material icons.
Pencil
Download the current version (2.0.14) in this repo:
https://github.com/prikhi/pencil/releases
Other option is downloading directly by the main site, but the version is older(2.0.5):
http://pencil.evolus.vn/Downloads.html
Stencil Collections
@castrors
castrors / rails_openshift
Last active July 18, 2016 14:47
Deploy de uma aplicação Rails usando Openshift
Tutorial ensinando a criar uma aplicação usando a gem rhc
http://guides.railsgirls.com/openshif
Resolver problema de compatibilidade com rack
http://stackoverflow.com/questions/32536312/rake-issue-when-deploying-ruby-on-rails
Resolver problema com assets
https://github.com/rails/sass-rails/issues/169
@castrors
castrors / index.html
Created August 15, 2016 19:27
Simple JsBarcode Demo
<svg id="code128"></svg>
<svg id="code39"></svg>
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(new MaterialApp(
home: new RepoListPage(),
));
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(new MaterialApp(
home: new RepoListPage(),
routes: <String, WidgetBuilder>{
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(new MaterialApp(
home: new RepoListPage(),
routes: <String, WidgetBuilder> {
@castrors
castrors / DiamondPrinter.kt
Created June 18, 2018 13:01
That's the solution for the DiamondPrint problem: http://exercism.io/exercises/kotlin/diamond/readme
class DiamondPrinter {
fun printToList(char: Char): List<String> {
val size = ('A'..char).count() * 2 - 1
val half = size / 2
return (0..half).map { lineIndex ->
StringBuilder("".padStart(size))
.apply {
setCharAt(half + lineIndex, 'A' + lineIndex)
setCharAt(half - lineIndex, 'A' + lineIndex)
@castrors
castrors / videotogif.py
Last active August 25, 2018 17:03
Converter todos os arquivos de uma pasta para gif. Pre requisito: instalar ffmpeg. Pra linux e mac é só colocar esse arquivo em uma pasta que voce tem os vídeos e rodar por commandline. Qualquer dúvida pode me chamar que eu ajudo a usar.
#!/usr/bin/env python
import os
for filename in os.listdir('.'):
if filename.endswith(".webm") or filename.endswith(".mp4"):
os.system('ffmpeg -i %s -r 10 -vf scale=480:-1 %s.gif' % (filename, filename))
continue
else:
continue
@castrors
castrors / palindrome.dart
Last active November 8, 2021 17:30
Implementation of palindrome in dart
import "dart:core";
void main() async {
final mymap = {
'arara': true,
'racecar': true,
')(()': true,
'radar': true,
'()()': false,
};