Cor — A minimal OO proposal for the Perl core
This is version 0.10 of this document.
# ======================================================== | |
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE | |
# ======================================================== | |
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces) | |
uci set network.lan.type='bridge' | |
# assign WAN physical interface to LAN (will be available as an additional LAN port now) | |
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)" | |
uci del network.wan.ifname | |
# Remove wan logical interface, since we will not need it. | |
uci del network.wan |
# ==================================================================================== | |
# Steps for Main Router (must have connected internet on WAN port) | |
# ==================================================================================== | |
# Set your network IP address configuration default is 192.168.1.0/24 | |
uci set network.lan.ipaddr='192.168.1.1' | |
# Recommended, to identify on network and when logged on | |
uci set system.@system[0].hostname='MainRouter' | |
uci set network.lan.hostname="`uci get system.@system[0].hostname`" |
# Client Bridged / Client Mode / RelayD and IGMPProxy (It works) | |
# RelayD is to redirect packages and IGMP is for redirect IGMP packages | |
# Our network is 192.168.1.0/24 | |
# Steps: | |
# Configure WAN as static | |
# We should edit our wan iface and put static IP | |
uci set network.wan='interface' | |
uci set network.wan.proto='static' | |
uci set network.wan.ipaddr='192.168.1.239' # Main Network IP |
#!/bin/bash | |
# Usage: | |
# ./perl_unused_subs.sh project_dir | |
# ./perl_unused_subs.sh project_dir another_project_dir_that_can_use_prev | |
# ACK_OPTIONS="-h" && ./perl_unused_subs.sh project_dir | |
INC_DIRS=$@ | |
TMP_FILE="$$.pl" |
// jQuery plugin: add .serializeObject() method to jQuery | |
// at this moment (jQuery v1.7.2) where no such method in core | |
// this method serializes a form into an (arguably more useful) object | |
(function($,undefined) { | |
$.fn.serializeObject = function() { | |
var obj = {}; | |
$.each( this.serializeArray(), function(i,o) { | |
obj[o.name] = obj[o.name] === undefined ? o.value : | |
$.isArray( obj[o.name] ) ? obj[o.name].concat( o.value ) : | |
[ obj[o.name], o.value ]; |
#!/usr/bin/perl | |
use v5.14; | |
use strict; | |
use warnings; | |
use PPI; | |
use Scalar::Util qw(blessed); | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>jQuery.plugin.convertTableToScrollable test</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js"></script> | |
<script type="text/javascript" src="jQuery.plugin.convertTableToScrollable.js"></script> | |
<style type="text/css"> | |
table { | |
border-collapse: collapse; |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync