Skip to content

Instantly share code, notes, and snippets.

@seco
seco / aws-afterfx-video.md
Created September 21, 2017 01:50
Setting up After Effects on AWS with Windows Server 2012

Setting up After Effects on AWS with Windows Server 2012

Hold on to your pants. This is a bit nuts.

Generating an Adobe After Effects installer:

  • Sign in to our Adobe Team account, go to 'Manage Team', download CCPLauncher.exe for windows.
  • This can be used to create a promptless installer for After FX.
  • Boot up a windows VM, preferably Windows 7 or newer.
  • Copy the CCPLauncher.exe to the VM's Desktop
  • Run the program. Follow the prompts in a windows box to generate the installer package.
$ patch -p0 -b < ../php-5.2.17.patch
patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).
@seco
seco / php-5.2.17.patch
Created March 14, 2018 00:49 — forked from simbo1905/php-5.2.17.patch
patch php 5.2.17 for Centos7 with patch -p0 < ../php-5.2.17.patch
--- ext/dom/node.c 2012-08-06 17:49:48.826716692 +0800
+++ ext/dom/node.c 2012-08-06 17:52:47.633484660 +0800
@@ -1895,9 +1895,17 @@ static void dom_canonicalization(INTERNA
RETVAL_FALSE;
} else {
if (mode == 0) {
+#ifdef LIBXML2_NEW_BUFFER
+ ret = xmlOutputBufferGetSize(buf);
+#else
ret = buf->buffer->use;
@seco
seco / follow.php
Created July 23, 2018 08:37 — forked from cosenary/follow.php
Instagram API class - follow user example
<?php
require 'Instagram.php';
use MetzWeb\Instagram\Instagram;
$instagram = new Instagram(array(
'apiKey' => 'YOUR_APP_KEY',
'apiSecret' => 'YOUR_APP_SECRET',
'apiCallback' => 'YOUR_APP_CALLBACK' // must point to success.php
));
@seco
seco / runner.js
Created August 2, 2018 06:25 — forked from phanan/runner.js
Record a webpage with PhantomJS and FFMpeg
// Run this from the commandline:
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
var page = require('webpage').create(),
address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279',
duration = 3, // duration of the video, in seconds
framerate = 24, // number of frames per second. 24 is a good value.
counter = 0,
width = 500,
height = 500;
@seco
seco / 00.howto_install_phantomjs.md
Created August 2, 2018 06:27 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

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
@seco
seco / gist:b9d477907ff1c67f0e43ddd802353463
Created August 27, 2018 08:09 — forked from allieus/gist:1180051
wgs84/tm127/tm128/grs80/cyworld 간 좌표변환
'''
aero님께서 구현하신 구글/네이버/싸이월드/콩나물 좌표변환은 펄/자바스크립트로 되어있습니다.
펄/자바스크립트에 익숙지 않은지라, 수식을 파이썬으로 번역해보았습니다.
'''
from pyproj import Proj
from pyproj import transform
WGS84 = { 'proj':'latlong', 'datum':'WGS84', 'ellps':'WGS84', }
@seco
seco / screenshot.js
Created October 31, 2018 02:45 — forked from pavelvlasov/screenshot.js
render html into png image with phantomjs
'use strict';
var system = require('system');
var html = system.args[1];
var width = system.args[2];
var height = system.args[3];
var page = require('webpage').create();
@seco
seco / pdf2img.html
Created September 17, 2019 05:25 — forked from jdeng/pdf2img.html
pdf to image using pdf.js
<html>
<body>
<script type="text/javascript" src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
<script type="text/javascript">
var url = "https://docs.google.com/document/export?format=pdf&id=1ML11ZyyMpnAr6clIAwWrXD53pQgNR-DppMYwt9XvE6s&token=AC4w5Vg7fSWH1Hq0SgNckx4YCvnGPaScyw%3A1423618416864";
var pages = [], heights = [], width = 0, height = 0, currentPage = 1;
var scale = 1.5;
function draw() {
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="test" transaction-type="RESOURCE_LOCAL">
<class>com.test.jpa.Student</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:test" />