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
// jQuery Plugin Boilerplate | |
// A boilerplate for jumpstarting jQuery plugins development | |
// version 1.1, May 14th, 2011 | |
// by Stefan Gabos | |
// remember to change every instance of "pluginName" to the name of your plugin! | |
(function($) { | |
// here we go! | |
$.pluginName = function(element, options) { |
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 a simple vue single file component example of using a subscription with vue-apollo. | |
This starts out as a query, and then if there are any changes to the underlying data, | |
the subscription updates it. The subscription works by holding open a websocket connection | |
to the GraphQL server. This was tested using Hasura.io and PostgreSQL, but should work with | |
any GraphQL implementation that supports websocket subscriptions. In the example, the | |
PostgreSQL table would be in a schema named "myschema" and a table named | |
"mytable" and that table would have two columns, "id" and "name". | |
--> |
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
Copied from https://www.pantz.org/software/mysql/mysqlcommands.html | |
This is a list of handy MySQL commands that I use time and time again. At the bottom are statements, clauses, and functions you can use in MySQL. Below that are PHP and Perl API functions you can use to interface with MySQL. To use those you will need to build PHP with MySQL functionality. To use MySQL with Perl you will need to use the Perl modules DBI and DBD::mysql. | |
Below when you see # it means from the unix shell. When you see mysql> it means from a MySQL prompt after logging into MySQL. | |
To login (from unix shell) use -h only if needed. | |
# [mysql dir]/bin/mysql -h hostname -u root -p | |
Create a database on the sql server. |
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 unobfuscate spiegel plus | |
// @namespace obfuscate | |
// @include http://www.spiegel.de/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
if(document.getElementsByClassName('obfuscated-content')[0] != undefined) { | |
document.getElementsByClassName('obfuscated-content')[0].setAttribute("class", ""); | |
var elems = document.getElementsByClassName('obfuscated'), t, or, c, i, cc; |
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
#--------------------------------------------- | |
# TINT2 CONFIG FILE | |
#--------------------------------------------- | |
# For more information about tint2, see: | |
# http://code.google.com/p/tint2/wiki/Welcome | |
# | |
# For more config file examples, see: | |
# http://crunchbanglinux.org/forums/topic/3232/my-tint2-config/ | |
# Background definitions |
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
SET @oldsite='http://oldsite.com'; | |
SET @newsite='http://newsite.com'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
/* only uncomment next line if you want all your current posts to post to RSS again as new */ | |
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
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
// iMacro CheatSheet - Command Reference | |
// http://wiki.imacros.net/Command_Reference | |
// iMacros supports 3 types of variables: | |
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro. | |
// * Built-in variables. They contain certain values set by iMacros. | |
// * User-defined variables. They are defined in-macro using the SET command. | |
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
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential git-core curl libssl-dev \ | |
libreadline5 libreadline5-dev \ | |
zlib1g zlib1g-dev \ | |
libmysqlclient-dev \ | |
libcurl4-openssl-dev \ | |
libxslt-dev libxml2-dev |
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
/*! | |
* Bootstrap v3.0.3 | |
* | |
* Copyright 2013 Twitter, Inc | |
* Licensed under the Apache License v2.0 | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Designed and built with all the love in the world @twitter by @mdo and @fat. | |
*/ |
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
function feedFilter($query) { | |
if ($query->is_feed) { | |
add_filter('rss2_item', 'feedContentFilter'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','feedFilter'); | |
function feedContentFilter($item) { | |
NewerOlder