Skip to content

Instantly share code, notes, and snippets.

View joepreludian's full-sized avatar
🛰️
Working from home

Jonhnatha Trigueiro joepreludian

🛰️
Working from home
  • Loka
  • Joao Pessoa PB
  • 15:37 (UTC -03:00)
View GitHub Profile
# This is my VCL file for Varnish 4.0.2 & Wordpress 4.0
#
# ASSUME The builtin VCL is called afterwards.
#
# Specify VCL new 4.0 format.
vcl 4.0;
# Imports
import std;
@joepreludian
joepreludian / simple_firewal.sh
Created November 20, 2015 13:31
Simple firewall script to start. Allows only 22 and 80 port.
# Exclui as regras ativas
iptables -t nat -F
iptables -t mangle -F
iptables -t filter -F
### Exclui cadeias customizadas
iptables -X
### Zera os contadores das cadeias
iptables -t nat -Z
@joepreludian
joepreludian / .vimrc
Created November 17, 2015 15:33
Joey's VIM RC - vim-bootstrap.com
"*****************************************************************************
"" NeoBundle core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
@joepreludian
joepreludian / default.vcl
Created October 30, 2015 12:51 — forked from derekclee/default.vcl
Varnish Cache Set CORS headers
sub vcl_deliver {
if (req.url ~ "/fonts/") {
set resp.http.Access-Control-Allow-Origin = "*";
set resp.http.Access-Control-Allow-Methods = "GET, OPTIONS";
set resp.http.Access-Control-Allow-Headers = "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token";
}
}
@joepreludian
joepreludian / tmux.conf
Created October 21, 2015 21:37
My tmux configuration file.
tbind -t vi-copy y copy-pipe "xclip -sel clip -i"
bind-key -n C-S-Up resize-pane -U 15
bind-key -n C-S-Down resize-pane -D 15
bind-key -n C-S-Left resize-pane -L 25
bind-key -n C-S-Right resize-pane -R 25
@joepreludian
joepreludian / antivirus.sh
Created October 15, 2015 21:32
Just remove the 1st maware line from a file; grep -rnwl . -e 'qxogeppjyr' to identify this kind of virus
#!/bin/bash
function repair_firstline {
FILE=$1;
cat ${FILE} | sed -e '0,/<?php.*\?>/s/<?php.*\?>//' > ${FILE};
echo -n '.';
}
@joepreludian
joepreludian / index.html
Last active August 30, 2015 20:10
Fast HTML
<!DOCTYPE html>
<html>
<head>
<title>Fast Page</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/cosmo/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<style type="text/css">
@joepreludian
joepreludian / gulpfile.js
Created August 11, 2015 02:36
GULP Stuff - Useful when working with coffeescript and sass
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
rename = require('gulp-rename');
var autoprefixer = require('gulp-autoprefixer');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin'),
cache = require('gulp-cache');
var minifycss = require('gulp-minify-css');
@joepreludian
joepreludian / .gitignore
Last active August 29, 2015 14:25 — forked from eykd/.gitignore
Full stack BDD testing with Behave+Mechanize+Django
*.pyc
bin/
include/
lib/
@joepreludian
joepreludian / site.nginx.conf
Created July 20, 2015 19:37
NGINX Template to handle php throught PHP-FPM over /var/run/sock/php.sock
server {
listen 80;
server_name myawesomesite.com www.myawesomesite.com;
client_max_body_size 4G;
root /home/mysite/public_html;
access_log /home/mysite/logs/nginx-access.log;
error_log /home/mysite/logs/nginx-error.log;