Skip to content

Instantly share code, notes, and snippets.

View BlaShadow's full-sized avatar
Working from home

Luis BlaShadow

Working from home
View GitHub Profile
BlaShadow / Progressview.dart
Created May 22, 2021 17:04
Progress view using flutter
/// This is the stateful widget that the main application instantiates.
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({Key key}) : super(key: key);
_MyStatefulWidgetState createState() => _MyStatefulWidgetState();
/// This is the private State class that goes with MyStatefulWidget.
BlaShadow / HttpCall.swift
Created May 13, 2020 13:04
Swift HTTP Call
httpCall(url: '') { (result) in
func httpCall(url: String, completion: @escaping (_: [String: Any]) -> Void) {
let url = URL(string: url)!
let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
guard let data = data else { return }
BlaShadow /
Created September 5, 2016 21:16 — forked from staltz/
The introduction to Reactive Programming you've been missing

Chill the lion

WebGL experiment using ThreeJS. Move the fan and press to make wind, the lion will surely appreciate.

A Pen by Karim Maaloul on CodePen.


BlaShadow /
Created June 13, 2014 19:51
Scroll list view into scrollview
ListView lv = (ListView)findViewById(; // your listview inside scrollview
lv.setOnTouchListener(new ListView.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
int action = event.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
// Disallow ScrollView to intercept touch events.
BlaShadow / url_encode
Last active August 29, 2015 14:02
Url encode
// file "NSDictionary+UrlEncoding.m"
#import "NSDictionary+UrlEncoding.h"
// helper function: get the string form of any object
static NSString *toString(id object) {
return [NSString stringWithFormat: @"%@", object];
// helper function: get the url encoded string form of any object
static NSString *urlEncode(id object) {
describe('/blog', function() {
it('returns blog posts as JSON', function(done) {
.set('x-api-key', '123myapikey')
.auth('correct', 'credentials')
.expect('Content-Type', /json/)
.end(function(err, res) {
if (err) return done(err);
rpm -Uih
curl -L | bash -s stable
rvm install 2.0.0
rvm use 2.0.0@global --default
# for chinese user, if you have a wonderful speed ignore this part
# to have a faster download speed
# switch gem source to
"country": {
"iso_code": "CO",
"names": {
"pt-BR": "Colômbia",
"es": "Colombia",
"ru": "Колумбия",
"en": "Colombia",
"zh-CN": "哥伦比亚",
"fr": "Colombie",
BlaShadow /
Created April 17, 2014 14:41 — forked from faruken/
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from twisted.application import service
from twisted.web import server, static
from twisted.web.resource import Resource
from twisted.web.wsgi import WSGIResource
from twisted.internet import reactor
from flask.views import MethodView