This file contains 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
# Step 1. | |
# Download the ieee list of Organizationally Unique Identifier (OUI) | |
# for all MAC addresses. | |
# | |
# wget http://standards.ieee.org/develop/regauth/oui/oui.txt | |
# Step 2. | |
# Run the following script to see the hardware on your system. | |
arp -a|awk '{print $4}'|tr '[:lower:]' '[:upper:]'|awk 'BEGIN{FS=":"}{cmd=sprintf("grep \"%s-%s-%s\" oui.txt",$1,$2,$3); cmd|getline D; close(cmd); print D}' |
This file contains 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
package main | |
//http://play.golang.org/p/0KdITlFYrV | |
import "fmt" | |
func main() { | |
H := make(map[string]int) | |
for i := 0; i < 3; i++ { | |
s := fmt.Sprintf("one%d", i) | |
H[s] = H[s] + 1 |
This file contains 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
package dev.sysadmin; | |
import java.lang.management.*; | |
import java.io.*; | |
import java.util.*; | |
import javax.management.*; | |
import javax.management.remote.*; | |
import com.sun.tools.attach.*; | |
import javax.management.openmbean.CompositeData; | |
public class Mjcon { |
This file contains 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
import Foundation | |
import UIKit | |
class MyUIV:UIView { | |
//ddrawRect:(CGRect)rect | |
override func drawRect(rect: CGRect) { | |
This file contains 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
// | |
// MainViewController.swift | |
// AddEvents | |
// | |
// Created by Michael Chirico on 9/6/14. | |
// Copyright (c) 2014 Michael Chirico. All rights reserved. | |
// | |
import UIKit |
This file contains 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
// | |
// MainViewController.swift | |
// AddEvents | |
// | |
// Created by Michael Chirico on 9/6/14. | |
// Copyright (c) 2014 Michael Chirico. All rights reserved. | |
// | |
import UIKit |
This file contains 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
/* | |
someObjects is [AnyObject!], but I want to | |
define it again as Array of Dictionary<String:String> | |
*/ | |
// Starts out like this | |
let someObjects: [AnyObject!] = [ | |
["a one":"1", "a two":"2","a three":"3"], | |
["b one":"1", "b two":"2","b three":"3"]] |
This file contains 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 | |
#scp -r /Users/mchirico/Dropbox/webDev/Publish/* mAW:/var/www/html | |
cp /Users/mchirico/How_to_Linux_and_Open_Source.txt /Users/mchirico/Dropbox/webDev/Publish/ | |
rsync -Lae ssh /Users/mchirico/Dropbox/webDev/Publish/ mAW:/var/www/html | |
rm -rf /Users/mchirico/Dropbox/webDev/Publish/* | |
cd /Users/mchirico/Dropbox/webDev/WebSiteDialog | |
git add Mike\ Chirico\'s\ Blog.rw6/ | |
git commit -a -m 'Update after pub' |
This file contains 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
TIP 22: | |
Keeping Files in Sync Between Servers. | |
The remote computer is "192.168.1.171" and has the account "donkey". You want | |
to "keep in sync" the files under "/home/cu2000/Logs" on the remote computer | |
with files on "/home/chirico/dev/MEDIA_Server" on the local computer. | |
$ rsync -Lae ssh donkey@192.168.1.171:/home/cu2000/Logs /home/chirico/dev/MEDIA_Server |
This file contains 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
<Directory "/var/www/html"> | |
order allow,deny | |
allow from all | |
deny from 1.0.1.0/24 | |
deny from 1.0.128.0/17 | |
deny from 1.0.2.0/23 | |
</Directory> |
OlderNewer