A Pen by Nicolas Justiniano on CodePen.
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 | |
# Perform Backup of all the files | |
if [[ ! -d ~/Minecraft_Backups/ ]];then | |
echo "Creating backup directory ~/Minecraft_Backups/" | |
mkdir -p ~/Minecraft_Backups/ | |
fi | |
tar -czf ~/Minecraft_Backups/`date +%Y%m%d`-backup.tgz /Applications/MinecraftSP.app |
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
<html> | |
<head> | |
<title></title> | |
</head> | |
<style type="text/css"> | |
body{ | |
width: 100%; | |
margin: 100%; | |
padding: 0; | |
margin: 0; |
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
def import | |
require 'xmlrpc/client' | |
if params[:number_posts] | |
number_posts=params[:number_posts].to_i | |
loops=number_posts / 100 | |
(1..loops.to_i).each do |i| | |
offset=100*i | |
connection = XMLRPC::Client.new2('http://www.nostalgic.cl/xmlrpc.php') | |
result = connection.call('wp.getPosts', 1, 'MEGO', 'mego123', {:number => 100, :offset => offset}) | |
#imported_posts = result.length |
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
<script type="text/javascript"> | |
$('#post_content').each(function(i, elem) { | |
$(elem).wysihtml5(); | |
$(".wysihtml5-toolbar").append('<li id="target"><a class="btn" title="Insert gallery" tabindex="-1" href="javascript:;" unselectable="on"><i class="icon-th-large"></i></a></li>'); | |
$("#target").click(function() { | |
bootbox.alert("Hello world!"); | |
}); | |
}); | |
</script> |
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
//kinda oldschool but it could help you in some project in Chile | |
$address = urlencode(utf8_encode($_GET['address'])); | |
$geocode = file_get_contents('http://maps.google.com/maps/api/geocode/json?address='. $address .'®ion=cl&sensor=false'); | |
$output= json_decode($geocode); | |
for ( $i = 0; $i < count ( $output->results[0]->address_components ); $i ++ ) { | |
switch ( $output->results[0]->address_components[$i]->types[0] ) { | |
case "administrative_area_level_1": | |
$region = $output->results[0]->address_components[$i]->long_name; | |
break; |
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 | |
function fetchData($url){ | |
//edit here | |
$search = "mercadoconvite"; | |
$access_token = "TU_TOKEN"; | |
$count = "14"; | |
//LET IT BE | |
$ch = curl_init(); |
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
namespace :cache do | |
desc 'Clear memcache' | |
task :clear => :environment do | |
Rails.cache.clear | |
end | |
end |
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
const eventPolyfill = () => { | |
if (typeof window.Event === 'function') { | |
return false; | |
} | |
const Event = (event) => { | |
const evt = document.createEvent('Event'); | |
evt.initEvent(event, true, true); | |
return evt; | |
}; |
I hereby claim:
- I am jstnn on github.
- I am justiniano (https://keybase.io/justiniano) on keybase.
- I have a public key ASCJdzDjc5lHhozkLbLYJeFyt1fGpt9FFPistbuM7pnXKQo
To claim this, I am signing this object: