Skip to content

Instantly share code, notes, and snippets.

View dsebao's full-sized avatar
🏠
Working from home

Sebastian Ortiz dsebao

🏠
Working from home
View GitHub Profile
@dsebao
dsebao / index.html
Last active February 15, 2018 15:17
<!doctype html>
<head>
<script type="text/javascript">
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
window.location.href= 'https://api.whatsapp.com/send?phone=+54297XXXXXX&text=Hola';
} else {
window.location.href= 'https://web.whatsapp.com/send?phone=+54297XXXXXX&text=Hola';
}
</script>
</head>
function scrollColor(){
$(window).on("scroll", function() {
if($(window).scrollTop() > 50) {
$(".navbar").addClass("colored");
} else {
$(".navbar").removeClass("colored");
}
});
}
@dsebao
dsebao / functions.php
Created July 21, 2017 14:52
ngrok for wordpress localsites (making relative url)
if (strstr($_SERVER['HTTP_HOST'], 'ngrok.io') !== false){
function callback_relative_url($buffer) {
// Replace normal URLs
$home_url = esc_url(home_url('/'));
$home_url_relative = wp_make_link_relative($home_url);
// Replace URLs in inline scripts
$home_url_escaped = str_replace('/', '\/', $home_url);
$home_url_escaped_relative = str_replace('/', '\/', $home_url_relative);
@dsebao
dsebao / style.less
Last active July 17, 2017 21:30
Bootstrap Carousel fade effect CSS3
.carousel-fade {
.carousel-inner {
.item {
transition-property: opacity;
}
.item,
.active.left,
.active.right {
opacity: 0;
@dsebao
dsebao / text.txt
Last active July 6, 2017 20:53
Exploits PHP SQL
In login:
Username: ' or 1=1#
Password: no-deface
or
' or 1=1 or ''=''
@dsebao
dsebao / index.html
Created June 21, 2017 17:49
Simple Google Map
<div style='overflow:hidden;height:500px;width:100%;'>
<div id='gmap_canvas' style='height:520px;width:100%;'></div>
</div>
<script src='https://maps.googleapis.com/maps/api/js?v=3.exp&key=yourkey'></script>
<script type='text/javascript'>
function mapa(){
var myOptions = {
zoom:16,
scrollwheel: false,
@dsebao
dsebao / testpop3
Last active April 27, 2017 14:01
Test POP3 connection on Windows and UNIX
Running a POP3 test using Telnet on Windows 2000/XP/Vista
Go to Start (start button on the lower left of the desktop)
Choose Run
Type: cmd
This should bring up a DOS prompt. Once there, enter: telnet incoming.servage.net 110
Type: user [email protected]
Type: pass yoursecretpassword
Type: list (Will present a numbered list over mails in mailbox)
Type: retr 1 (Will display e-mail number 1)
Exit session by entering: quit
@dsebao
dsebao / terminal
Created April 26, 2017 19:11
Test internet connection with terminal
curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip
@dsebao
dsebao / .htaccess
Last active April 13, 2017 16:01
Read first index.html then index.php
DirectoryIndex index.html index.php
@dsebao
dsebao / index.html
Created March 7, 2017 14:19
Social share snippet (WP)
<!doctype>
<html>
<head>
<link href="https://file.myfontastic.com/n6vo44Re5QaWo8oCKShBs7/icons.css" rel="stylesheet">
</head>
<body>
<div id="share">
<ul class="social-share" data-url="<?php echo wp_get_shortlink(); ?>" data-title="<?php the_title();?>">
<li><a href="" class="facebook share s_facebook"><i class="socicon-facebook"></i></a></li>
<li><a href="" class="twitter share s_twitter"><i class="socicon-twitter"></i></a></li>