Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Adrián G mrroot5

🏠
Working from home
Block or report user

Report or block mrroot5

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View didact-fiber.js
// Effect tags
const PLACEMENT = 1;
const DELETION = 2;
const UPDATE = 3;
function arrify(val) {
return val == null ? [] : Array.isArray(val) ? val : [val];
}
function reconcileChildrenArray(wipFiber, newChildElements) {
@zhreshold
zhreshold / check_platform.py
Last active May 30, 2019
Check OS/Python/Cpu Info and Network connections
View check_platform.py
"""Diagnose script for checking OS/hardware/python/pip/mxnet/network.
The output of this script can be a very good hint to issue/problem.
"""
import platform, subprocess, sys, os
import socket, time
try:
from urllib.request import urlopen
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
@skooltch84
skooltch84 / Highlight_Calendar_Main_Activity
Created Oct 18, 2016
Java Code used in my Highlight Events Calendar
View Highlight_Calendar_Main_Activity
package com.blogspot.skooltchdev.highlightcalendar;
import android.content.Context;
import android.graphics.Color;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
import com.github.sundeepk.compactcalendarview.CompactCalendarView;
@commadelimited
commadelimited / flask.py
Created Nov 23, 2014
Multiple Flask URL routes on a single method
View flask.py
@course.route('/courses/<slug>_<id>/print/')
@course.route('/courses/<slug>_<id>/')
def show_course(slug=None, id=None):
# how do I know whether /print was used, or just normal?
pass
@jalcaldea
jalcaldea / telegram-installer.sh
Last active Jun 3, 2019
Small script that simplifies Telegram installation in ubuntu.
View telegram-installer.sh
#!/bin/bash
echo "============================================="
echo "== Telegram Script Installer v 0.1 =="
echo "== =="
echo "== by Jalcaldea =="
echo "============================================="
echo "Downloading necesary files..."
@andrewslince
andrewslince / install casperjs (and phantomjs) on ubuntu
Last active Aug 5, 2019
simple tutorial for installing casperjs on ubuntu
View install casperjs (and phantomjs) on ubuntu
# install phantomjs
cd /usr/local/share
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.2-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs; sudo ln -s /usr/local/share/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs; sudo ln -s /usr/local/share/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
sudo apt-get install fontconfig
# install casperjs
cd /var/www/
git clone git://github.com/n1k0/casperjs.git
@maccevedor
maccevedor / origin
Created Jul 5, 2014
Saber cual origin esta utilizando mi repositorio en git
View origin
git remote show origin
@swinton
swinton / AESCipher.py
Last active Sep 26, 2019
Encrypt & Decrypt using PyCrypto AES 256 From http://stackoverflow.com/a/12525165/119849
View AESCipher.py
#!/usr/bin/env python
import base64
from Crypto import Random
from Crypto.Cipher import AES
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
unpad = lambda s : s[0:-ord(s[-1])]
@simplethemes
simplethemes / youtube-url.php
Created Nov 21, 2013
Extracts YouTube video ID from various URL structures
View youtube-url.php
<?php
$url = array (
'http://youtu.be/dQw4w9WgXcA',
'http://www.youtube.com/embed/dQw4w9WgXcB',
'http://www.youtube.com/watch?v=dQw4w9WgXcC',
'http://www.youtube.com/?v=dQw4w9WgXcD',
'http://www.youtube.com/v/dQw4w9WgXcE',
'http://www.youtube.com/e/dQw4w9WgXcF',
'http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcG',
@julionc
julionc / 00.howto_install_phantomjs.md
Last active Oct 15, 2019
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
You can’t perform that action at this time.