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 os,sys,importlib | |
from os import path | |
def RunScript(sPath,sFile,bDirect=2): | |
''' Run a Python Script via differenct Methods | |
@param sPath Sting containing Only the | |
Absolute Path of the File to Execute | |
@param sFile String containing Only the File Name to Execute | |
@param bDirect Flag indicates how to run the Script | |
0 = Run using Exec Technique | |
1 = Run directly in Shell |
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/python | |
import sys | |
import csv | |
def print_usage(): | |
print "Usage: {} <csv_file>".format(sys.argv[0]) | |
if len(sys.argv) != 2: | |
print "Not enough arguments" | |
print_usage() |
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/python | |
"""\ | |
Simple g-code streaming script | |
https://github.com/bborncr/gcodesender.py/blob/master/gcodesender.py | |
""" | |
import serial | |
import time | |
import argparse |
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
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 | |
import sys,os,fileinput | |
def main(argv): | |
for line in fileinput.input(): | |
bytes = line.lstrip(".byte ").rstrip('\n').split(',') | |
print(".byte ", end="") |
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
copy() { | |
if [[ $1 =~ ^-?[hH] ]]; then | |
echo "Intelligently copies command results, text file, or raw text to" | |
echo "OS X clipboard" | |
echo | |
echo "Usage: copy [command or text]" | |
echo " or pipe a command: [command] | copy" | |
return | |
fi |
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
git remote prune origin | |
git branch -r --merged master | egrep -iv '(master|develop)' | sed 's/origin\///g' | xargs -n 1 git push --delete origin |
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 | |
# Copyright 2010 Eric Ryan Harrison <me@ericharrison.info> | |
# Inspired by: | |
# http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/ | |
if [ -n "$1" ] | |
then | |
if [ "$1" = "off" ] | |
then | |
tc qdisc del dev lo root |
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/python | |
import sys | |
import os, shutil | |
import subprocess | |
import os.path | |
from datetime import datetime | |
######################## Functions ######################### |
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
// Copyright (C) 2019, Dan Ravensloft | |
// SPDX-License-Identifier: GPL-3.0-or-later | |
library(74series) { | |
// 7400 quad 2-input NAND gate | |
cell(7400_4xNAND2) { | |
area: 3; | |
pin(A) { direction: input; } | |
pin(B) { direction: input; } | |
pin(Y) { direction: output; function: "(A*B)'"; } | |
} |
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
'use strict'; | |
class HTMLElementPlus extends HTMLElement { | |
static defaultAttributeValue() { | |
/* the name of the attribute is parsed in as a parameter */ | |
return; | |
} | |
static parseAttributeValue(name, value) { |
OlderNewer