This file contains hidden or 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
node_modules | |
public/socket.io.min.js | |
public/jquery.js |
This file contains hidden or 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 | |
if [ ! -d $1 ]; then | |
echo "Not a directory: $1" | |
exit -1 | |
fi | |
while read line; do | |
filename="$(basename $line)" | |
if [ "${filename##*.}" == "less" ]; then |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# USAGE: sudo ./newrepo.rb folder_name origin_url | |
# Give it exec permissions before running: chmod +x init.rb | |
# Protip: add it to your ~/.profile or ~/.bash_profile, copy it to your ~/Scripts and run it from anywhere: | |
# alias new_repo="~/Scripts/new_repo.rb" | |
require 'fileutils' |
This file contains hidden or 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
# files modified within 30 days. | |
find /home/mywebsite -type f -name "*.php" -ctime -30 | |
# find for suspicious strings | |
find ./ -name "*.php" -type f | xargs sed -i 's#<?php /\*\*/ eval(base64_decode("aWY.*?>##g' 2>&1 | |
find ./ -name "*.php" -type f | xargs sed -i '/./,$!d' 2>&1 | |
# grep for suspicious and very long strings | |
grep -R "document.write(unescape" * | |
grep -iR --include "*.js" "[a-zA-Z0-9\/\+]\{255,\}" * |
This file contains hidden or 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
# Agregar esto a .bashrc o a .bash_aliases | |
# Uso: add_ssh [email protected] | |
function add_ssh { | |
cat ~/.ssh/id_rsa.pub | ssh $1 'cat >> .ssh/authorized_keys' | |
} | |
export -f add_ssh |
This file contains hidden or 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
(function($) | |
{ | |
$.fn.stickytitle = function(options) | |
{ | |
var opts = $.extend($.fn.stickytitle.defaults, options); | |
var elements = this, starting_offsets = new Array(); | |
elements.each(function(index){ | |
//before anything happens, the original top offsets of each element are saved | |
starting_offsets[index] = $(this).offset().top; | |
}); |
This file contains hidden or 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
find . -type d -print0 | xargs -0 chmod 0755 # For directories | |
find . -type f -print0 | xargs -0 chmod 0644 # For files |
This file contains hidden or 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
UPDATE wp_options SET option_value = replace(option_value, 'http://old.tld', 'http://new.tld') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://old.tld','http://new.tld'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://old.tld', 'http://new.tld'); |
This file contains hidden or 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
// Assumes you want to run a kue server on port 3001 with the path '/kue'. | |
// Use a proxy like nginx to send the requests to the appropriate URL. | |
require lodash = require('lodash'), | |
kue = require('kue'); | |
// Prepend the Kue routes with '/kue' | |
lodash.each(['get', 'put', 'delete'], function(verb) { | |
lodash.each(kue.app.routes.routes[verb], function(route, index, routes) { | |
routes[index].path = '/kue' + route.path; |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- To import this information into a WordPress site follow these steps: --> | |
<!--RUN THIS FILE IN FIREFOX OR IE--> | |
<!--VIEW PAGE SOURCE--> | |
<!--COPY-PASTE PAGE SOURCE INTO TEXT EDITOR AND SAVE AS .WXR FILE--> | |
<!--REMOVE "?'s" FROM XML VERSION AT TOP OF THIS PAGE--> | |
<!--COMMENT OUT LINE 1309, 1310, 1311 IN wp-includes/kses.php --> | |
<!--THEN FOLLOW THE STEPS BELOW--> |
OlderNewer