Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View IgnacioGaldames's full-sized avatar
🚀
Desafío Latam

Ignacio Galdames IgnacioGaldames

🚀
Desafío Latam
View GitHub Profile
@IgnacioGaldames
IgnacioGaldames / trunc.php
Created June 27, 2017 22:19
Limitar palabras en Wordrpress
//en functions.php
function trunc($phrase, $max_words, $after = null) {
$phrase_array = explode(' ',$phrase);
if(count($phrase_array) > $max_words && $max_words > 0)
$phrase = implode(' ',array_slice($phrase_array, 0, $max_words)) . $after;
return $phrase;
}
<html>
<head>
<title>informacion-expo-peru</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<style type="text/css">
td img {
display: block;
border: 0;
margin: 0;
@IgnacioGaldames
IgnacioGaldames / placeholder_shown.css
Last active April 24, 2017 17:25
Estilizar el placeholder de un input.
input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: #fff !important;
}
input::-moz-placeholder { /* Firefox 19+ */
color: #fff !important;
}
input:-ms-input-placeholder { /* IE 10+ */
color: #fff !important;
}
input:-moz-placeholder { /* Firefox 18- */
@IgnacioGaldames
IgnacioGaldames / jquery_toggle.html
Last active April 24, 2017 17:20
Simple show content con jQuery
<button class="btn btn-danger" id="click_desc">
Ver Más
</button>
<section id="desc">
<h1>hide content</h1>
</section>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script>
$(document).ready(function() {
$("button").click(function() {
@IgnacioGaldames
IgnacioGaldames / ibooks.opf
Created March 7, 2017 14:58
Solución error ePub
<item id="iTunesArtwork" href="../iTunesArtwork" media-type="image/jpg"></item>
@IgnacioGaldames
IgnacioGaldames / Copyright.js
Created February 27, 2017 13:44
Copyright webpages
sudo gem install -n /usr/local/bin jekyll
@IgnacioGaldames
IgnacioGaldames / html_email_basic_css.html
Last active January 30, 2017 15:54
html header para emails
<style type="text/css">
td img {
display: block;
border: 0;
margin: 0;
}
body {
margin: 0;
padding: 0;
}
@IgnacioGaldames
IgnacioGaldames / php_array_in_javascript.js
Created December 14, 2016 19:51
php array in javascript
var myArray = <?php echo json_encode($php_array); ?>;
sudo npm install -g npm
sudo npm install -g express
mkdir TestProject
cd TestProject
npm init --yes
npm install request --save