Skip to content

Instantly share code, notes, and snippets.

@plorechax
plorechax / README.md
Created November 4, 2016 13:52
Shazam Lite app patch

Shazam Lite app patch

This is a patch for Shazam Lite app.

Features

  • Disables region restriction.
    The app sends "in" (India) country code to the Shazam servers. The code for this feature was taken from a modification by blunden. All credits should go to him.
  • Disables beacon requests.
@balbuf
balbuf / wordpress-import-update.php
Created October 15, 2016 17:54
Force the WordPress importer to update existing posts instead of skipping them
<?php
/**
* When using the WordPress Importer, update existing
* posts instead of skipping them. Updates content according
* to the import file even if the existing post was updated
* more recently.
*
* To use, drop this file into your /mu-plugins/ folder or
* copy this code into your functions.php file.
@noelboss
noelboss / git-deployment.md
Last active April 16, 2026 15:03
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active March 11, 2026 23:59
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@dannyconnolly
dannyconnolly / translate_woocommerce.php
Created December 18, 2015 13:22
Change SKU text label in woocommerce to Product Code
function translate_woocommerce($translation, $text, $domain) {
if ($domain == 'woocommerce') {
switch ($text) {
case 'SKU':
$translation = 'Product Code';
break;
case 'SKU:':
$translation = 'Product Code:';
break;
@rveitch
rveitch / sass-7-1-pattern.scss
Last active April 25, 2026 17:55
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@mattclements
mattclements / function.php
Last active May 11, 2026 01:04
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@nledez
nledez / gist:49d7d583f9675c83c754
Created June 19, 2015 15:17
Install from the internet
{curl,wget -O -} http://{debian,ubuntu}.cozycloud.cc/install-cozy-{debian-jessie,ubuntu-trusty}.sh | [get_cmd=curl] {ba,z,}sh -
curl http://debian.cozycloud.cc/install-cozy-debian-jessie.sh | get_cmd=curl sh -
wget -O - http://debian.cozycloud.cc/install-cozy-debian-jessie.sh | bash -
curl http://ubuntu.cozycloud.cc/install-cozy-ubuntu-trusty.sh | get_cmd=curl zsh -
And all other variations...
The only limitation is in URL:
http://debian.cozycloud.cc/install-cozy-debian-jessie.sh
@ge0ffray
ge0ffray / .htaccess
Last active February 24, 2016 12:42
Hijack PHP easter eggs using .htaccess. This could be an alternative solution when no possibility to disable expose_php in php.ini
RewriteEngine On
RewriteCond %{QUERY_STRING} ^=PHPE9568F3[4-6]-D428-11d2-A769-00AA001ACF42$ [OR]
RewriteCond %{QUERY_STRING} ^=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000$
RewriteRule (.*) - [F]
@m1r0
m1r0 / wp_insert_attachment_from_url.php
Last active October 17, 2025 00:50
WP: Insert attachment from URL
<?php
/**
* Insert an attachment from a URL address.
*
* @param string $url The URL address.
* @param int|null $parent_post_id The parent post ID (Optional).
* @return int|false The attachment ID on success. False on failure.
*/
function wp_insert_attachment_from_url( $url, $parent_post_id = null ) {