Skip to content

Instantly share code, notes, and snippets.

Avatar

Craig London craiglondon

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am craiglondon on github.
  • I am moobud (https://keybase.io/moobud) on keybase.
  • I have a public key ASAJqDLNISLLdwWi4CYVUrA_ZUCjeqIC0zqhcGQyLoZeFwo

To claim this, I am signing this object:

@craiglondon
craiglondon / tcpview.sh
Created Aug 31, 2017
A Windows' TCPView-like command for linux
View tcpview.sh
#!/bin/bash
watch -pn 0.1 "netstat -pat"
@craiglondon
craiglondon / .jshintrc
Last active Jul 8, 2016 — forked from artanisdesign/.jshintrc
Titanium JSHint setup
View .jshintrc
{
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"indent": 4,
"unused": true,
"onevar": true,
"undef": true,
"trailing": true,
"latedef": true,
@craiglondon
craiglondon / rename-UpperToLower.sh
Created Mar 3, 2016
Rename file extension, upper to lower
View rename-UpperToLower.sh
### http://stackoverflow.com/questions/8899135/renaming-multiples-files-with-a-bash-loop
### Author: Craig V London
### Date: 03/03/2016
### Purpose: I wanted to rename the extension of some files, from upper to lower
### Written for use in CygWin, but should work on most Linux installs
for i in *XEN
do
NEWNAME="${i/%.XEN/.xen}"
mv -- "$i" "$NEWNAME"
done
View .htaccess
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)
View iptables.sh
###########################
# Variables Section
###########################
# iptables path --> iptables binary
IPT=$(which iptables)
# internet interface --> ifconfig
IFACE="venet0:0"
#####################################
View equal-height-bs.html
<html>
<head>
<title>Equal Height columns on Bootstrap</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
View passwordless_ssh.md

Simply digit

cd

If you dont' have already an ssh keychan generate it

ssh-keygen -t rsa -C "your@email.com"

Lastly

View wp-permissions-script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Original Author: Michael Conigliaro
# Author: Craig London
# UBUNTU Config
WP_OWNER=changeme # &lt;-- wordpress owner
View .htaccess
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)
You can’t perform that action at this time.