Skip to content

Instantly share code, notes, and snippets.

View gradha's full-sized avatar

Grzegorz Adam Hankiewicz gradha

View GitHub Profile
@gradha
gradha / tumblr-gdpr-cgi-bin-proxy.py
Created August 5, 2018 11:30
Simple python cgi-bin proxy to fetch rss feeds from Europe (see https://github.com/ViennaRSS/vienna-rss/issues/1166)
#!/usr/bin/env python
print "Content-Type: text/xml"
print
# To use this script, put it on your host supporting python 2.x, in the cgi-bin
# directory. Then test with your browser something like
# https://your.host.com/cgi-bin/tumblr-gdpr-cgi-bin-proxy?u=hematocritico.tumblr.com/rss
# Hopefully that works and you get some rss xml.
import cgi
@gradha
gradha / folder265.xml
Created July 31, 2018 21:26
viennarss tumblr fetch without cookies
<!DOCTYPE html>
<!--
.o .o88 .o88
.88 "888 "888
o8888oo ooo oooo ooo. .oo. .oo. 888oooo. 888 oooo d8b
""888"" 888 "888 "888P"Y88bP"Y88b d88' `88b 888 "888""8P
888 888 888 888 888 888 888 888 888 888
888 . 888 888 888 888 888 888. 888 888 888 .o.
"888Y `V88V"V8P' o888o o888o o888o 88`bod8P' o888o d888b Y8P
@gradha
gradha / install-libsodium.sh
Created August 16, 2016 19:38 — forked from jonathanpmartins/install-libsodium.sh
Install Libsodium on Ubuntu 14.04.3 LTS Trusty
#!/bin/bash
sudo add-apt-repository ppa:chris-lea/libsodium;
sudo echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo apt-get update && sudo apt-get install libsodium-dev;
@gradha
gradha / ExtractMpegFramesTest_egl14.java
Last active January 16, 2022 14:11
Original source for the ExtractMpegFramesTest_egl14.java file by BigFlake (http://bigflake.com/mediacodec/) and required transformation to handle rotated videos. See http://stackoverflow.com/questions/38699825/why-does-extractmpegframestest-not-work-with-rotated-input-files for more information.
/*
* Copyright 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#########################
# CODE INCLUDED BY BOTH
# COMPILATION UNITS.
# Trait definition
type DrawableVTable* = tuple[
drawType: int,
preDraw: proc(self: ref TObject): bool {.nimcall.},
draw: proc(self: ref TObject) {.nimcall.}
]
INFO global: Vagrant version: 1.7.1
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_LOG="debug"
@gradha
gradha / stdlib_cpuinfo.c
Created December 3, 2014 17:21
cpuinfo as main program compiled with 0.9.6 compiler in release mode
/* Generated by Nimrod Compiler v0.9.6 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -O3 -I/private/tmp/back/Nimrod/lib -o lib/pure/concurrency/nimcache/stdlib_cpuinfo.o lib/pure/concurrency/nimcache/stdlib_cpuinfo.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <sys/types.h>#include <sys/sysctl.h>static N_INLINE(void, initStackBottomWith)(void* locals);
N_NOINLINE(void, setStackBottom)(void* thestackbottom);
@gradha
gradha / stdlib_cpuinfo.c
Created December 3, 2014 17:16
cpuinfo as module compiled with patched 0.9.6 compiler in release mode
/* Generated by Nimrod Compiler v0.9.6 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -O3 -I/private/tmp/back/Nimrod/lib -o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <sys/types.h>#include <sys/sysctl.h>
N_NOINLINE(void, stdlib_cpuinfoInit)(void) {
@gradha
gradha / stdlib_cpuinfo.c
Last active August 29, 2015 14:10
cpuinfo as module compiled with 0.9.6 compiler in release mode
/* Generated by Nimrod Compiler v0.9.6 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -O3 -I/private/tmp/back/Nimrod/lib -o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <sys/types.h>#include <sys/sysctl.h>N_NOINLINE(void, stdlib_cpuinfoInit)(void) {
}
@gradha
gradha / stdlib_cpuinfo.c
Created December 3, 2014 17:13
cpuinfo as module compiled with 0.9.6 compiler in debug mode
/* Generated by Nimrod Compiler v0.9.6 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -I/private/tmp/back/Nimrod/lib -o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>