Skip to content

Instantly share code, notes, and snippets.

@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 / 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;
$ 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 / 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.
/*
* XSS filter
*
* This was built from numerous sources
* (thanks all, sorry I didn't track to credit you)
*
* It was tested against *most* exploits here: http://ha.ckers.org/xss.html
* WARNING: Some weren't tested!!!
* Those include the Actionscript and SSI samples, or any newer than Jan 2011
*
@seco
seco / slack.php
Created April 7, 2017 07:34 — forked from stefanzweifel/slack.php
Slack.com Webhook Integration (PHP) - Simple snippet which tells you, how to build your payload array.
<?php
//Options
$token = 'YOUR_TOKEN_HERE';
$domain = 'YOUR_SLACK_DOMAIN_GOES_HERE';
$channel = '#general';
$bot_name = 'Webhook';
$icon = ':alien:';
$message = 'Your message';
@seco
seco / receiver.ino
Created April 5, 2017 05:32 — forked from rlogiacco/receiver.ino
nRF24 multiple transmitters
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
int senderId;
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
//Contacts from the radio to connect NRF24L01 pinamnam -> Arduino
@seco
seco / dht22_deepsleep.ino
Created April 5, 2017 05:29 — forked from chaeplin/dht22_deepsleep.ino
dht22_deepsleep.ino
// CPU 80MHZ, FLASH 4M/1M
/*
*** Sample using esp-01, D16 is connected to RST
*** If DHT22 is powered by a gpio( VCC of DHT22 is connected to a gpio) and OUTPUT of DHT22 is connected to D2, boot will fail.
*** Power off ----> D2 is in LOW( == DHT22 is in LOW) ==> SDIO boot mode.
Temperature and humidity values are each read out the results of the last measurement.
For real-time data that need continuous read twice, we recommend repeatedly to read sensors,
and each read sensor interval is greater than 2 seconds to obtain accuratethe data.
@seco
seco / Energy_Monitor_Real.ino
Created April 5, 2017 05:29 — forked from chaeplin/Energy_Monitor_Real.ino
ESP8266 Energy Monitor Real Power
/*
* This sketch sends ads1115 current sensor data via HTTP POST request to thingspeak server.
* It needs the following libraries to work (besides the esp8266 standard libraries supplied with the IDE):
*
* - https://github.com/adafruit/Adafruit_ADS1X15
*
* designed to run directly on esp8266-01 module, to where it can be uploaded using this marvelous piece of software:
*
* https://github.com/esp8266/Arduino
*
@seco
seco / lgacdecode.ino
Created April 5, 2017 05:27 — forked from chaeplin/lgacdecode.ino
lgacdecode.ino
#include <IRremoteESP8266.h>
//#include <IRremote.h>
int RECV_PIN = 14;
IRrecv irrecv(RECV_PIN);
void setup ( )
{
Serial.begin(115200);
irrecv.enableIRIn();