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
class pack_install: | |
import yum | |
packages = [] | |
def addPackage(self,p): | |
self.packages.append(p) | |
def runInstall(self): | |
sys.path.append('/usr/share/yum-cli') | |
import cli | |
y = cli.YumBaseCli() |
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
class specfile: | |
def __init__(self): | |
self.package = '' | |
self.version = '' | |
self.release = '1' | |
self.files = [] | |
self.configs = [] | |
self.license = 'GPL' | |
self.packager = 'RPM Generator <rpm@generator>' | |
self.vendor = 'none' |
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
function neweggPrice(part) { | |
var response = UrlFetchApp.fetch('http://www.ows.newegg.com/Products.egg/' + part); | |
var j = response.getContentText(); | |
var data = Utilities.jsonParse(j); | |
var price = data["FinalPrice"]; | |
return(price); | |
} |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# asterisk.py | |
# | |
# Copyright 2014 James Finstrom<jfinstrom at gmail> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
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
def boxtext(msg): | |
lines = msg.split("\n") | |
width = len(max(lines, key=len))+4 | |
topline = u"\u2554" + u"\u2550"*width + u"\u2557"+"\n" | |
side = u"\u2551" | |
bottom = u"\u255a"+ u"\u2550"*width + u"\u255d"+"\n" | |
box = topline | |
for l in lines: | |
if len(l)<2: | |
continue |
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
def grabFile(url, dest): | |
"""grabFile(fileUrl, saveLocation) | |
By James Finstrom | |
Grabs file and saves to specified location | |
""" | |
#file = get_threeohtwo(url) | |
request = urllib2.Request(file) | |
filename = url.split('/')[-1].split('#')[0].split('?')[0] |
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/sh | |
# Copyright 2012 The Android Open Source Project | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
int btn = 2; | |
int spkr = 10; | |
int incomingByte = 0; | |
int bybtn = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
Serial.println("Arduino Online"); | |
Serial.println(".............."); | |
//setup board |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# ingressmail.py | |
# | |
# Copyright 2014 James Finstrom <jfinstrom at gmail.com> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
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 | |
# THIS SCRIPT SETS UP SOME BASIC IP TABLES RULES FOR YOUR SYSTEM. | |
# YOU SHOULD BUY A BOOK AND GOOGLE TO UNDERSTAND WHAT IS GOING ON HERE. | |
# YOUR SYSTEM'S SECURITY SHOULD NOT BE LEFT UP TO A SCRIPT APPLICATION | |
# OR ME. IT IS YOUR RESPONSIBILITY TO ENSURE YOUR OWN SECURITY. | |
# THIS IS PRESENTED WITHOUT ANY WARRANTY. ANY USE OF THIS IS AT YOUR OWN RISK | |
# | |
# Written by James Finstrom ([email protected]) | |
# |
OlderNewer