Skip to content

Instantly share code, notes, and snippets.

View hunk's full-sized avatar
🤑
working

Edgar G @hunk hunk

🤑
working
View GitHub Profile
{
"491289025" : "ijinshan-kappmarket://",
"301521403" : "fb103361823069955://",
"492178411" : "ils492178411://",
"346142396" : "fb234434003713://",
"310633997" : "whatsapp://",
"370614765" : "com.condenet.newyorker://",
"325058491" : "rnmddisco://",
"382952264" : "epichttp://",
"477048487" : "predictwind://",
#!/bin/sh
##############################################################
# This is the ShellShocker.net bash updater script.
# Version 1.0!
#
# Are you looking at this in your web browser, and would like to apply the bash patches?
# Just open up your terminal and type:
#
# curl https://shellshock.net/fixbash | sh
########
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetRoomsAvailablePromoResponse xmlns="http://tempuri.org/">
<GetRoomsAvailablePromoResult xmlns:a="http://schemas.datacontract.org/2004/07/CityHub" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Disponibilidad>
<a:Available>
<a:CodigoError i:nil="true"/>
<a:CodigoTarifa>1268</a:CodigoTarifa>
<a:DescError i:nil="true"/>
<a:Descripcion>Promoción App</a:Descripcion>
(function( $ ){
var mf_stack = [];
var mf_before_sort = [];
var mf_after_sort = [];
var mf_before_save = [];
var methods = {
init : function( options ) { methods.callback_execute_js(mf_stack); },
duplicate : function( ) { methods.callback_execute_js(mf_stack); },
add: function( content){ mf_stack.push(content); },
before_sort: function(content){ mf_before_sort.push(content); },
jQuery.mf_bind('add',function(){
if('undefined' != typeof tinyMCEPreInit){
jQuery(".multiline_custom_field .add_editor_mf").each( function(index,value){
var editor_text = jQuery(this).attr('id');
tinyMCE.execCommand('mceAddEditor', true, editor_text);
jQuery(this).removeClass('add_editor_mf');
});
}
});
jQuery.mf_bind('before_sort', function(){
<?php
query_posts( array(
'post_type' => array( 'post', 'postType1', 'postType2', 'other_post_type' ),
'showposts' => 5 )
);
?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<p><?php the_title(); ?></p>
// https://github.com/hunk/Kit-iOS/tree/master/rotation
//para iniciar la animación
// el primer parametro es el tiempo en segundos de cada ciclo (vuelta completa)
// el segundo parametro es la dirección de la rotación
[my_button spinInfinityButtonWithTime:2 direction:-1];
[my_image spinInfinityImageWithTime:5 direction:1];
@hunk
hunk / gist:2764992
Created May 21, 2012 22:05
JavaScript for detecting iOS devices
var deviceAgent = navigator.userAgent.toLowerCase();
var iOS = deviceAgent.match(/(iphone|ipod|ipad)/);
if (iOS) {
// iOS
} else {
// not iOS
}
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
int numFrase = arc4random() % 3;
NSString *html = [NSString stringWithFormat:@"<html><body style=\"background-color: transparent;\" ><img src='%d.gif'></body></html>",numFrase];
if (cual == 2) {
[homero loadHTMLString:html baseURL:baseURL];
//remove the ugly shadow of uiwebview
for(UIView *wview in [[[myCustomWebView subviews] objectAtIndex:0] subviews]) {
if([wview isKindOfClass:[UIImageView class]]) {
wview.hidden = YES;
}
}