Skip to content

Instantly share code, notes, and snippets.

View KhanMaytok's full-sized avatar
🎃
Comiendo chaufita

KhalO KhanMaytok

🎃
Comiendo chaufita
View GitHub Profile
@KhanMaytok
KhanMaytok / ionic.html
Last active August 29, 2015 14:27
Absolute center in ionic
<ion-content padding="false" scroll="false" has-bouncing="false">
<div id="form">
<div class="list">
<label class="item item-input" id="company">
<input type="text" placeholder="Company Name*" focus-me="{{cmpFocus}}" ng-model="user.companyname" maxlength="100">
</label>
<div class="padding submitbtn">
<button type="submit" class="button" ng-click="registration(user);">SUBMIT</button>
</div>
</div>
@KhanMaytok
KhanMaytok / file.html
Created August 18, 2015 14:59
Populate a select with angular
<select ng-model="selectedTestAccount" ng-options="item.Id as item.Name for item in testAccounts">
<option value="">Select Account</option>
</select>
@KhanMaytok
KhanMaytok / nnnn
Last active September 27, 2015 09:18
https://www.digitalocean.com/community/tutorials/building-for-production-web-applications-overview
https://www.digitalocean.com/community/tags/load-balancing
http://www.microsiervos.com/archivo/peliculas-tv/asi-se-crearon-los-dragones-de-la-quinta-temporada-de-juego-de-tronos.html
https://aws.amazon.com/es/architecture/
@KhanMaytok
KhanMaytok / download-file.js
Last active November 28, 2015 00:06
Mostrar barra de descarga al descargar fichero node
var fs = require('fs');
var http = require('http');
var fsize;
var skBar = document.getElementById('progressbar');
//Función que maneja la descarga del archivo
var download = function(url, dest, cb) {
var file = fs.createWriteStream(dest);
var request = http.get(url, function(response) {
//Para ver el progreso, primero necesitamos saber el tamaño total del archivo
@KhanMaytok
KhanMaytok / particle-sphere.js
Created December 8, 2015 23:38
Create a sphere made of particles with Three.js
var distance = 100;
var geometry = new THREE.Geometry();
for (var i = 0; i < 1000; i++) {
var vertex = new THREE.Vector3();
var theta = THREE.Math.randFloatSpread(360);
var phi = THREE.Math.randFloatSpread(360);
@KhanMaytok
KhanMaytok / reading_time.rb
Created December 11, 2015 21:49 — forked from zachleat/reading_time.rb
Read this in X minutes Liquid Filter Plugin (for Jekyll)
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180
@KhanMaytok
KhanMaytok / fixtures.php
Last active December 14, 2015 21:59
Create DoctrineFixtures with FOSUserBundle
<?php
// Change the namespace!
namespace Acme\DemoBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@KhanMaytok
KhanMaytok / site.com.conf
Created December 14, 2015 23:02
Apache 2 configuration for proxy
<virtualhost *:80>
ServerName youtrack.ecapy.com
ProxyPreserveHost On
ProxyRequests Off
<proxy *>
Order deny,allow
Allow from all
</proxy>
{
"@context" : "http://schema.org",
"@type" : "Organization",
"name" : "Maytok",
"url" : "https://www.maytok.com",
"sameAs" : [
"https://twitter.com/woorank",
"https://plus.google.com/+woorank",
"https://www.facebook.com/woorank",
"https://foursquare.com/v/woorank/4e296473149554c77442cc98",
# jekyll-readtime
# 2015 Ron Scott-Adams, Licensed under MIT:
# https://tldrlegal.com/license/mit-license
# Original work: https://gist.github.com/zachleat/5792681
# Outputs the estimated time the average person might take to read the content.
# 200 is a round figure based on estimates gathered from various studies.
# http://www.ncbi.nlm.nih.gov/pubmed/18802819
# Usage: {{ page.content | readtime }}