This file contains hidden or 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
var path = require('path'); | |
var routePrefix = '_router'; | |
var exports = module.exports; | |
/** | |
* Register all sections routes | |
* @param {exports.Server} server | |
*/ | |
exports.registerRouts = function(server: hapiServer) { | |
var sections = ['movies', 'auth', 'series']; |
This file contains hidden or 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
var fs = require('fs'); | |
var path = require('path'); | |
function copyRecursive(src, dest) { | |
var copyPromises = []; | |
var copy = function copy(src, dest) { | |
var exists = fs.existsSync(src); | |
var stats = exists && fs.statSync(src); |
This file contains hidden or 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
var fs = require('fs'); | |
var path = require('path'); | |
var childProcess = require('child_process'); | |
var dir = './components'; | |
var nodeComand = 'npm install'; | |
var packageFile = 'package.json'; | |
var nodeVersion = process.versions.node.split('.'); | |
if (!(nodeVersion[0] >= 0 && nodeVersion[1] >= 12 && nodeVersion[2] >= 4)) { |
This file contains hidden or 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
import subprocess | |
import sys | |
download_base_path = sys.argv[1] | |
final_destination = sys.argv[2] | |
""" | |
Start unrar script in a new process. | |
This will cause an exit code of 0, even if unrar.py hangs. | |
""" |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>VT</title> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
html, body, #view { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Snake</title> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script src="snake.js"></script> | |
<style type="text/css"> | |
.snake_piece { | |
position:fixed; | |
left:50%; |
This file contains hidden or 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
import time, os | |
size = 25 | |
b = [[0 for x in xrange(size)] for x in xrange(size)] | |
a = [[0 for x in xrange(size)] for x in xrange(size)] | |
b[10][10] = 1 | |
b[11][11] = 1 |
This file contains hidden or 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 | |
$username = ''; | |
$password = ''; | |
$points = ''; | |
$login_url = 'https://www3.student.liu.se/portal/login'; | |
$redirect = 1; | |
$redirect_url = '/portal/sv/portal/'; | |
$time = 0; | |
$login_para = ''; |
This file contains hidden or 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
import urllib | |
import xbmc | |
__HOST__ = '192.168.0.15' | |
__PORT__ = '8000' | |
class MyPlayer(xbmc.Player): | |
__is_playing = False | |
__url = 'http://' + __HOST__ + ':' + __PORT__ |
This file contains hidden or 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
import os | |
import datetime | |
import pytz | |
from flask import Flask | |
from astral import Astral | |
app = Flask(__name__) | |
__TELLSTICK_PATH__ = '/usr/bin/tdtool' | |
__WINDOW_ID__ = ['1', '2', '3'] |