Skip to content

Instantly share code, notes, and snippets.

View skynet's full-sized avatar

Ionel Roiban skynet

View GitHub Profile
$ curl -i http://git.io -F "url=https://github.com/technoweenie" \
-F "code=t"
HTTP/1.1 201 Created
Location: http://git.io/t
http://sourceforge.net/projects/shelled/files/shelled/update/
@skynet
skynet / gist:743c1310b20aee9f0cb1
Created February 24, 2015 23:44
Howto Remove Skype Plugin Markup with jQuery
/*
If you have installed the latest version of Skype on Windows, it automatically installs browser plugins for IE and FireFox. The browser plugin detects phone numbers on the page injects markup with clickable links to dial the number in Sykpe.
This has caused some issues for Web Developers because the plugin sometimes picks up text that is not actually a phone number. Or it can screw up a design that has fixed width requirements.
So how do you disable this nice feature? Skype had supported a meta tag at one point:
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
This meta tag is not supported in the Current Version, as confirmed by a Skype Employee.
@skynet
skynet / gist:47d233d20f7010828d01
Last active September 19, 2015 15:32
Detecting Ad Blockers on Your Website
<div class="afs_ads">&nbsp;</div>
<script>
(function() {
var message = "We've detected that you have an ad blocker enabled! Please enable it and help support our work!";
// Define a function for showing the message.
// Set a timeout of 2 seconds to give adblocker
// a chance to do its thing
var tryMessage = function() {
setTimeout(function() {
https://chrome.google.com/webstore/detail/awesome-screenshot-captur/alelhddbbhepgpmgidjdcjakblofbmce
How many trackers does a single Chrome extension need?
Seven.
https://ssl.google-analytics.com/ (manifest.json, javascripts/cga.js)
https://cdn.extensionanalytics.com/ (manifest.json, javascripts/feedback.js)
https://pixel.getpaidfordata.com/ (manifest.json, background.html)
https://tags.crwdcntrl.net/ (manifest.json)
#!/bin/bash
# Author: Liraz Siri <[email protected]> 2015 - GPL3 licensed
if [ -z "$1" ] || [ "$1" = "-h" ]; then
cat<<EOF
Syntax: $0 lsof-pattern
Restarts running Debian services that match lsof-pattern (e.g., libc)"
Environment variables:

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
@skynet
skynet / Responsive-HTML5-Video-using-Javascript.markdown
Created January 31, 2015 01:20
Responsive HTML5 Video using Javascript

Responsive HTML5 Video using Javascript

responsive embedded HTML5 utilizing video-js open source, bootstrap, jquery/javascript and minimal css customizations.

This is the ideal embedding style for self hosted, CDN sourced, video. Clean easy to integrate solution for static blogs and video blogs.

by Raymond Anthony [email protected]

A Pen by ray anthony on CodePen.

#!/bin/bash
# Check out the blog post at:
#
# http://www.philipotoole.com/influxdb-and-grafana-howto
#
# for full details on how to use this script.
AWS_EC2_HOSTNAME_URL=http://169.254.169.254/latest/meta-data/public-hostname
INFLUXDB_DATABASE=test1
@skynet
skynet / wpmail.php
Last active August 29, 2015 14:13 — forked from kopiro/wpmail.php
<?php
$ses = Aws\Ses\SesClient::factory(array(
'key' => SES_KEY,
'secret' => SES_SECRET,
'region' => SES_REGION
));
class SesClientProxyForPHPMailer {
private $phpmailer;