This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* $.parseParams - parse query string paramaters into an object. | |
*/ | |
(function($) { | |
var re = /([^&=]+)=?([^&]*)/g; | |
var decode = function(str) { | |
return decodeURIComponent(str.replace(/\+/g, ' ')); | |
}; | |
$.parseParams = function(query) { | |
var params = {}, e; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "=============================================" | |
echo "== Telegram Script Installer v 0.1 ==" | |
echo "== ==" | |
echo "== by Jalcaldea ==" | |
echo "=============================================" | |
echo "Downloading necesary files..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Based on https://gist.github.com/provegard/1536682, which was | |
# Based on getifaddrs.py from pydlnadms [http://code.google.com/p/pydlnadms/]. | |
# Only tested on Linux! | |
from socket import AF_INET, AF_INET6, inet_ntop | |
from ctypes import ( | |
Structure, Union, POINTER, | |
pointer, get_errno, cast, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote show origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
OlderNewer