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 | |
use Symfony\Component\HttpFoundation\File\File; | |
/* | |
This class is a hack/workaround for the InvalidArgumentException "The filename fallback must only contain ASCII characters." | |
for file downloads with non-ASCII filenames. Since the Response::download() method doesn't allow specifying a fallback name, | |
this is the only realistic option, aside from extending, rewriting, and maintaining a bunch of framework classes, or | |
modifying the framework itself. | |
*/ |
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
{ | |
"id": 617991, | |
"token": "6c3afbfe52", | |
"title": "(C80) [Fukunoren (Yukiwo)] labyrinth (Alice In Wonderland) [SMDC] [English]", | |
"title_jp": "(C80) [福のれん (ユキヲ)] labyrinth (ふしぎの国のアリス) [英訳]", | |
"uploader": "shuntensatsu", | |
"rating_count": 96, | |
"rating_average": 4.72, | |
"images_count": 19, | |
"file_size": 16714949, |
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
var http = require('http'); | |
if(process.argv.length < 3) { | |
console.error('Missing listen address argument'); | |
return; | |
} | |
var listenAddress = process.argv[2]; | |
var server = http.createServer(function (req, res) { |
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
$ bash -c "echo '2 eth1_rt' >> /etc/iproute2/rt_tables" | |
$ cat /etc/network/interfaces | |
# interfaces(5) file used by ifup(8) and ifdown(8) | |
# Include files from /etc/network/interfaces.d: | |
source-directory /etc/network/interfaces.d | |
auto eth0 | |
iface eth0 inet dhcp | |
auto eth0:1 |
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/env php | |
<?php | |
/* | |
* This script will transform file names for templates downloaded for OpenVZ[1], | |
* to match the format used in Proxmox[2]. | |
* | |
* [1] https://download.openvz.org/template/precreated/ | |
* [2] http://pve.proxmox.com/wiki/Template_naming_convention | |
* |
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
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you. | |
auto vmbr0 | |
iface vmbr0 inet static |
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
# Usage: logcat [options] [filterspecs] | |
# (adb logcat or run logcat from shell inside Android) | |
# filterspecs are a series of | |
# <tag>[:priority] | |
# | |
# where <tag> is a log component tag (or * for all) and priority is: | |
# V Verbose | |
# D Debug | |
# I Info | |
# W Warn |
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
embed: function(t, e) { | |
var i = function(t) { | |
var e = JSON.parse(t.data), | |
i = e.action, | |
n = e.data || {}; | |
void 0 !== mediamanager[i] && mediamanager[i](n) | |
}; | |
this.eventsSet || (void 0 !== window.addEventListener ? (window.removeEventListener("message", i), window.addEventListener("message", i)) : (window.detachEvent("onmessage", i), window.attachEvent("onmessage", i)), this.eventsSet = !0), void 0 === this.meta.pageurl && (this.meta.pageurl = window.location.href), void 0 === this.autoresize && (this.autoresize = !1), void 0 === this.aspect && (this.aspect = ["16", "6"]); | |
var n, | |
r = void 0 !== this.scroll && this.scroll; |
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
#include <iostream> | |
#include <SDL.h> | |
void draw(SDL_Window * window, SDL_Renderer * renderer) { | |
int w, h; | |
SDL_GetWindowSize(window, &w, &h); | |
for (int y = 0; y < h; ++y) { | |
for (int x = 0; x < w; ++x) { | |
//srand(x * y); |
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/sh | |
curl https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz -O | |
tar xf coreutils-8.31.tar.xz | |
cd coreutils-8.31 | |
./configure --enable-no-install-program=$(./build-aux/gen-lists-of-programs.sh --list-progs | tr '\n' ',' | sed -e 's/realpath,//' -e 's/,$//') | |
make | |
ln -s $(which install) src/ginstall # Hack because we didn't build GNU install, but make install requires it | |
echo "\nNow run 'make install' to install realpath\n" |
OlderNewer