This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PHP cpulimit daemon | |
* | |
* PHP cpulimit daemon checks for http calls with REQUEST_URI and limites those processes. | |
* This is related to https://github.com/opsengine/cpulimit/issues/40#issuecomment-73372492 | |
* and http://www.tronko.es/servers/cpulimit-howto/ | |
* | |
* LICENSE: This source file is subject to version 3.01 of the PHP license | |
* that is available through the world-wide-web at the following URI: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The simplest way i found to check javascript vía PHP | |
* Not to run code if javascript, to tell server if a client | |
* has enabled Javascript. Check at $_SESSION['js'] for 1/0 true/false | |
* | |
* Need cookie to run | |
* | |
* I've not wrapped into a class nor a function because lazy | |
* It's easy too to put a include_once("javascript-check.php") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# One line original script: | |
# curl -L https://gio.io/wp.sh | bash | |
# One line ES_es: | |
# curl -L https://git.io/v4dSJ | bash | |
# You can define port by setting variable PORT before exec the script, otherwise fallback to 8080. | |
# curl -L https://git.io/v4dSJ | PORT=8888 bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wp-cli basic install script with sqlite database. | |
# requires installing wp-cli.phar following instructions from http://wp-cli.org/. | |
# Download wp-package, by default does download en_US package (--locale="en_US") | |
wp core download --locale="es_ES" | |
# U can later install another language package | |
# wp core language es_ES --activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name soundcloud autoplay | |
// @author erm3nda at gmail.com | |
// @author-www http://erm3nda.github.io | |
// @post-www http://erm3nda.github.io/2016/04/28/soundcloud-autoplay-gm-userscript.html | |
// @namespace souncloud-autoplay | |
// @icon http://files.softicons.com/download/social-media-icons/simple-icons-by-dan-leech/png/32x32/soundcloud.png | |
// @description Does autoplay first track of given category | |
// @include https://soundcloud.com/* | |
// @include https://soundcloud.com/charts/top/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time, os, sys, signal | |
sleeptime = waketime = 0.01 | |
def send(signal, pids): | |
for pid in pids: | |
os.kill(pid, signal) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System; | |
import System.IO; | |
import System.Windows.Forms; | |
import Microsoft.VisualBasic; | |
import Fiddler; | |
// GLOBALIZATION NOTE: | |
// Be sure to save this file with UTF-8 Encoding if using any non-ASCII characters | |
// in strings, etc. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
## This is an example of a simple sound capture script that counts Applauses (or other louder sounds). | |
## U can adjust the data value to fit your desired sound by it's amount of data lenght value | |
## The script opens an ALSA pcm for sound capture and several modules. Set | |
## various attributes of the capture, and reads in a loop, | |
## Volume is getting porcentual to medium values of starting noise, not just a fixed value, but not bulletproof | |
## Adjust your volume settings or change the desired value on `sound_raise`. | |
## TODO: Ad proper methods names and values | |
## TODO: Convert to a class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This code it's a mix of some good javascript fixes, a cookie manager, and audio tag features. | |
It ads those functions: | |
- Auto stop other players when starting a new one (avoid multiple sounds at time) | |
- Remember status of player via cookie, to autostart radio if the user wants. | |
Related links: | |
http://stackoverflow.com/questions/19790506/multiple-audio-html-auto-stop-other-when-current-is-playing-with-javascript/29045474#29045474 | |
http://stackoverflow.com/questions/14573223/set-cookie-and-get-cookie-with-javascript#24103596 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is one of my regular scripts, i'd like to create my own functions to understand how everything works. | |
# Usually, when it comes to ip checking, people don't fully understand how it works, and tend to do some BAD checks. | |
# The MOST realiable way to check an IP it's let the system to tell you, cuz every language having networking can do that, need to do that. | |
# There's a few functions that uses various Python modules and functions to check and test IP and hostnames in many ways. | |
#!/usr/bin/env python | |
#! -*- coding: utf-8 -*- | |
import sys, re, socket, urllib2, httplib | |
from urlparse import urlparse |
OlderNewer