Skip to content

Instantly share code, notes, and snippets.

View 02Tea's full-sized avatar
🥴

Austin Nicomedez 02Tea

🥴
View GitHub Profile
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php
*/
$args = array(
<select>
<option value="AF">Afghanistan</option>
<option value="AX">Åland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
<?php
/*
|------------------------------------------
| Disable Auto Dual Optin Popup form
|------------------------------------------
|
| disable pop-up opt-in if Page Dual Opt-in -> Disable dual opt-in pop-up is == Yes
| for pages only.
|
| @for hawkgroupmedia-dev
@02Tea
02Tea / Sticky-Header.markdown
Created September 11, 2013 08:49
A Pen by austinicomedez.
@02Tea
02Tea / stringtohashtag.php
Created July 22, 2017 12:32
[String to Hashtag] #php #peg #exnc
/**
* conver string to hastag
* @param string $string string you want to convert
* @param boolean $with_hashtag if false, it won't return the # sign
* @return string Eureka! you got your #hashtag!
*/
function stringToHashtag($string, $with_hashtag = true)
{
$_string = str_replace(' ', '', $string);
$_out = preg_replace('/[^a-zA-Z]/', '', strtolower($_string));
@02Tea
02Tea / js-dynamic-image-sizes.js
Created July 25, 2017 13:55
[Dynamic image sizes] #js #jquery
$(document).ready(function(){
$('.events__deck > img').each(function(){
$(this).on('load', function(){
var w = $(this).prop("naturalWidth");
var h = $(this).prop("naturalHeight");
var ex = 0.10;
// expand images
w += w * ex;
h += h * ex;
@02Tea
02Tea / watch-http-server.md
Created January 15, 2018 06:38
[watch-http-server] livereload your projects locally #npm #tools
@02Tea
02Tea / rdesktop.md
Last active March 11, 2018 19:10
[rdesktop] remote desktop tool #tools #linux #windows

90% of actual screen size

rdesktop -u <username> -g 90% <ipaddress>

fullscreen

rdesktop -z -P -f -u <username> <ipaddress>

folder sharing

@02Tea
02Tea / watermelonBMTest.js
Last active April 2, 2018 04:46
[Watermelon BM test] #javascript
javascript:(function(){"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function Watermelon(e){var t=[],o=void 0,r=void 0,n={colors:5,threshold:255},a=e?e:n,l={position:"absolute",width:"100%",height:"100%","z-index":99999},i={display:"inline-block",position:"relative","margin-bottom":"-5px",height:"100%",width:a.size+"%",transition:"all 0.3s ease"},c=function(e){return console.log(e)},d=function(){var e=50+Math.floor(Math.random()*a.threshold),t=50+Math.floor(Math.random()*a.threshold),o=50+Math.floor(Math.random()*a.threshold);return"rgb( "+e+", "+t+", "+o+" )"},s=function(e){var t="";for(var o in e)e.hasOwnProperty(o)&&(t+=o+":"+e[o]+";");return t},u=function(e,t,o){var r=o|t<<8|e<<16;return"#"+(16777216+r).toString(16).slice(1)},m=function(e){return e.substring(4,e.length-1).replace(/ /g,"").split(",")},p=function(){document.getElementById("exocarp")&&document.getElementById("exocarp").remove();var e=docum