Skip to content

Instantly share code, notes, and snippets.

@fritsstegmann
fritsstegmann / Setup Redis 6 with TLS on Ubuntu 18.04.md
Last active January 26, 2025 18:28
Setup Redis 6 with TLS
On Ubuntu 18.04
@forkfork
forkfork / ioredis_example.js
Last active April 13, 2021 17:41
Example of using Redis Streams with Javascript/ioredis
var Redis = require('ioredis');
var redis = new Redis({
host: "nodesydney.wiftycloud.com",
password: "7884b8baaa49fbcb48f17ad2a146"
});
async function main() {
// write an event to stream 'events', setting 'key1' to 'value1'
await redis.sendCommand(
@keithporcaro
keithporcaro / loiter.js
Created September 10, 2015 18:28
This is a quick and dirty casperjs script that will load a twitter profile or a list and loiter, waiting for new tweets to be posted. It will screen capture new tweets that get posted, and save the screencaps in tweets/[twitter handle]/[tweet id].png. You can set the interval and the url.
var casper = require('casper').create(
url = 'https://twitter.com/jaspermid/lists/open-data', //this will monitor a list or a user.
interval = 1000
);
casper.start(url);
casper.then(function(){
if(this.exists('.tweet')){
console.log("ok, we're good");
@megaxorg
megaxorg / PHP-CURL-Tor-Tutorial.md
Last active August 15, 2024 09:55
PHP: CURL Requests with Tor

#CURL Connections with Tor

Install Apache, PHP, CURL & Tor with apt-get

sudo apt-get install -y apache2 php5 php5-curl tor

Tor creates a proxy on your mashine with port 9050 for SOCKS5 connections.

@pbojinov
pbojinov / README.md
Last active November 5, 2025 23:10
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@johnpbloch
johnpbloch / README.md
Created August 23, 2012 13:55
A bash script to make .pot files for WordPress plugins

Installation

To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:

sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n

You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc file (with no trailing slash):

export WP_I18N_LIB="/path/to/i18n/lib"

@MatthewEppelsheimer
MatthewEppelsheimer / country-shortcode.php
Last active October 31, 2025 19:26
WP Contact Form 7 shortcode with list of Countries
<?php
/*
Localizations:
- [Spanish](https://gist.github.com/MatthewEppelsheimer/1498955#gistcomment-3317461) props @chdgp
UPDATED: 2020-03-09