Skip to content

Instantly share code, notes, and snippets.

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

Talles Airan tallesairan

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://www.youtube.com/iframe_api"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/numeral.js/1.4.5/numeral.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
@tallesairan
tallesairan / Ajax snippet
Created May 15, 2015 18:47
Snippet ajax
$('.btn-evento a').click(function(event) {
event.preventDefault();
$.ajax(this.href, {
dataType: 'html',
success: function(data) {
$('.galeriazoeira').html(data);
//$('.galeriazoeira').text('The page has been successfully loaded');
},
error: function() {
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: local('Open Sans Italic'),
local('OpenSans-Italic'),
url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2');
}
@font-face {
font-family: 'Open Sans';
#######################################################################
# OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+ #
# For more information please visit http://oneinstack.com #
#######################################################################
Do you want to setup SSL under Nginx? [y/n]: n
Please input domain(example: www.linuxeye.com): talles.org
domain=talles.org
@tallesairan
tallesairan / Facebook Ips
Created July 2, 2017 21:52
Facebook ips 02/07/2017
204.15.20.0/22
69.63.176.0/20
66.220.144.0/20
66.220.144.0/21
69.63.184.0/21
69.63.176.0/21
74.119.76.0/22
69.171.255.0/24
173.252.64.0/18
69.171.224.0/19
@tallesairan
tallesairan / deletes.sh
Created October 4, 2017 17:16
Delete all files recursively with name on unix systems
find / -name .DS_Store -print0 | xargs -0 rm -rf
@tallesairan
tallesairan / yum.sh
Last active October 4, 2017 17:19
restore centos to inital install
If everything was installed via the yum package manager, you can undo previous commands:
# Get all yum commands previously run
yum history list all
# Get the details of the command
yum history info [entry number]
# Undo each command top-down
yum history undo [entry number]
@tallesairan
tallesairan / Login.php
Created October 10, 2017 12:29
Login on centos, using unix user and password on php
<?php
class Login{
static function authenticate($user, $pass){
$shad = preg_split("/[$:]/",`cat /etc/shadow | grep "^$user\:"`);
$mkps = preg_split("/[$:]/",trim(`mkpasswd -m sha-512 $pass $shad[3]`));
return ($shad[4] == $mkps[3]);
}
public function handleAuth($user,$pass){
return $this->authenticate($user,$pass);
@tallesairan
tallesairan / copySite.sh
Created October 17, 2017 11:35
copy all site entire with wget
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://sitetocopy.com
@tallesairan
tallesairan / tab.js
Last active October 26, 2017 12:57
go to last tab after reload page bootstrap
$(function() {
// for bootstrap 3 use 'shown.bs.tab', for bootstrap 2 use 'shown' in the next line
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
// save the latest tab; use cookies if you like 'em better:
localStorage.setItem('lastTab', $(this).attr('href'));
});
// go to the latest tab, if it exists:
var lastTab = localStorage.getItem('lastTab');
if (lastTab) {