Skip to content

Instantly share code, notes, and snippets.

View meskarune's full-sized avatar
Halfway back to productivity

Dolores Portalatin meskarune

Halfway back to productivity
View GitHub Profile
@meskarune
meskarune / main
Created November 3, 2012 12:50
netconfig file
CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth0'
IP='static'
ADDR='66.175.208.202'
GATEWAY='66.175.208.1'
### For IPv6 static address configuration
IP6='static'
ADDR6=('2600:3c03::f03c:91ff:feae:9243/64')
@meskarune
meskarune / systemd status netcfg
Created November 3, 2012 13:00
netcfg status
netcfg.service - Netcfg multi-profile daemon
Loaded: loaded (/usr/lib/systemd/system/netcfg.service; enabled)
Active: active (exited) since Wed, 2012-10-24 09:35:32 EDT; 1 weeks and 2 days ago
Main PID: 18037 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/netcfg.service
├ 1998 dhcpcd -qL -t 10 eth0
└ 2939 dhcpcd -qL -t 10 eth0
Nov 02 09:35:31 maharani dhcpcd[2939]: eth0: acknowledged 66.175.208.202 from 207.192.68.72
Nov 02 09:35:31 maharani dhcpcd[1998]: eth0: acknowledged 66.175.208.202 from 97.107.143.38
@meskarune
meskarune / html5 template.html
Created November 12, 2012 16:28
Simple HTML template
<!DOCTYPE html>
<html>
<head>
<META charset="UTF-8" />
<title>
{put your title here}
</title>
<link rel="stylesheet" type="text/css" media="all" href="default.css" />
</head>
<body>
@meskarune
meskarune / main
Created November 17, 2012 14:23
Working NetCGF
CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth0'
IP='static'
ADDR='66.175.208.202'
GATEWAY='66.175.208.1'
### For IPv6 static address configuration
IP6='static'
ADDR6=('2600:3c03::f03c:91ff:feae:9243/64')
@meskarune
meskarune / redmine rails script output
Created December 16, 2012 03:48
debugging redmine install
sudo ruby rails server webrick -e production
[sudo] password for meskarune:
=> Booting WEBrick
=> Rails 3.2.9 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Exiting
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query': Mysql2::Error: Can't create/write to file '/tmp/#sql_342a_0.MYI' (Errcode: 13): SHOW FULL FIELDS FROM `users` (ActiveRecord::StatementInvalid)
from /usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
ls -la
total 100K
drwxr-xr-x 17 http http 4.0K Dec 15 02:51 ./
drwxr-xr-x 8 root root 4.0K Dec 15 05:42 ../
drwxr-xr-x 7 http http 4.0K Dec 13 20:32 app/
-rw-r--r-- 1 http http 1.4K Dec 23 2008 cleanurl.lua
drwxr-xr-x 5 http http 4.0K Dec 15 00:34 config/
-rw-r--r-- 1 http http 160 Dec 13 20:32 config.ru
drwxr-xr-x 3 http http 4.0K Dec 15 00:34 db/
drwxr-xr-x 2 http http 4.0K Dec 13 20:32 doc/
@meskarune
meskarune / vimrc
Created January 20, 2013 08:01
Vim config file
syntax on
set background=dark
colorscheme slate
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
Bundle 'gmarik/vundle'
@meskarune
meskarune / signup.sh
Created January 22, 2013 08:53
add a new user
#!/bin/bash
GREP=/bin/grep
USERADD=/usr/sbin/useradd
PASSWD=/usr/bin/passwd
echo "Please enter your name and press [ENTER]: "
read name
@meskarune
meskarune / lighttpd php-fpm
Last active December 12, 2015 02:09
config for php-fpm
fastcgi.server = (
".php" => (
"localhost" => (
"socket" => "/var/run/lighttpd/php-fpm.sock",
"broken-scriptfilename" => "enable"
))
)
@meskarune
meskarune / swapuse
Created March 20, 2013 18:41
A script that shows swap usage
#!/bin/bash
# find-out-what-is-using-your-swap.sh
# -- Get current swap usage for all running processes
# --
# -- rev.0.3, 2012-09-03, Jan Smid - alignment and intendation, sorting
# -- rev.0.2, 2012-08-09, Mikko Rantalainen - pipe the output to "sort -nk3" to get sorted output
# -- rev.0.1, 2011-05-27, Erik Ljungstrom - initial version