Skip to content

Instantly share code, notes, and snippets.

View silicontrip's full-sized avatar
💭
Less for Powershell

Mark Heath silicontrip

💭
Less for Powershell
View GitHub Profile
base:
pkg.installed:
- pkgs:
- python-software-properties
- python
- g++
- make
- ruby1.9.1
- libav-tools
- npm
#/bin/bash
while true
do
homeuuid=$(grep '/home' /etc/fstab | awk '{print $1}' | cut -d = -f 2)
ssd=$(lsblk -o KNAME,MODEL | grep SSD | cut -d ' ' -f 1)
mounted=$(mount | grep /home | cut -d ' ' -f 1 )
ssduuid=$(ls -la /dev/disk/by-uuid | grep bcache0 | awk '{print $9}')
formatted=$( ls /dev/bcache0 )
task 1 remove duplicates;
make list of duplicates
duplicate_list[] = file[2]
for duplicate_list:
# get both parents of each file.
path1 = file[0].parent
path2 = file[1].parent
#!/usr/bin/python
import os
import sys
import hashlib
def get_files(path):
fl = os.walk(path)
allfiles=[]
for pp,pd,pf in fl:
from FreeCAD import Base
import Part
import Sketcher
import time
def xsection(obj,height):
wires=[]
for i in obj.slice(Base.Vector(0,0,1),height):
wires.append(i)
@silicontrip
silicontrip / gist:740ec68ee124a567bdd6e0aad6476d3e
Last active January 15, 2019 07:03
Freecad python Dalek shoulders
from FreeCAD import Base
import Part
import Sketcher
def xsection(obj,height):
wires=[]
for i in obj.slice(Base.Vector(0,0,1),height):
wires.append(i)
return Part.Wire(wires)
@silicontrip
silicontrip / repo_cp.py
Created January 6, 2018 02:12
copy utility that checks that the file doesn't exist within the destination directory tree
#!/usr/bin/python
import sys
import os
import json
import shutil
import hashlib
import atexit
from threading import Thread
@silicontrip
silicontrip / jpg2exr.py
Created February 12, 2018 06:05
convert jpg 2 exr with ability to apply brightness curve
#!/usr/bin/python
import OpenEXR
import cv2
import sys
import array
def srgb2lin(px):
ft = px / 255.0
if ft < 0.04045:
@silicontrip
silicontrip / jpg2exr.py
Created February 12, 2018 06:05
convert jpg 2 exr with ability to apply brightness curve
#!/usr/bin/python
import OpenEXR
import cv2
import sys
import array
def srgb2lin(px):
ft = px / 255.0
if ft < 0.04045:
1.Table.3.TableRow.2.TableCell.2.Paragraph.2.Run.2.Text: Team: [54 00 65 00 61 00 6d 00 3a 00 T.e.a.m.:.]
1.Table.3.TableRow.3.TableCell.2.Paragraph.2.Run.2.Text: Brisbane Lions [42 00 72 00 69 00 73 00 62 00 61 00 6e 00 65 00 20 00 4c 00 69 00 6f 00 6e 00 73 00 B.r.i.s.b.a.n.e. .L.i.o.n.s.]
1.Table.4.TableRow.2.TableCell.2.Paragraph.2.Run.2.Text: Match: [4d 00 61 00 74 00 63 00 68 00 3a 00 M.a.t.c.h.:.]
1.Table.4.TableRow.3.TableCell.2.Paragraph.2.Run.2.Text: AFL Round 22 - Melbourne v Brisbane Lions [41 00 46 00 4c 00 20 00 52 00 6f 00 75 00 6e 00 64 00 20 00 32 00 32 00 20 00 2d 00 20 00 4d 00 65 00 6c 00 62 00 6f 00 75 00 72 00 6e 00 65 00 20 00 76 00 20 00 42 00 72 00 69 00 73 00 62 00 61 00 6e 00 65 00 20 00 4c 00 69 00 6f 00 6e 00 73 00 A.F.L. .R.o.u.n.d. .2.2. .-. .M.e.l.b.o.u.r.n.e. .v. .B.r.i.s.b.a.n.e. .L.i.o.n.s.]
1.Table.5.TableRow.2.TableCell.2.Paragraph.2.Run.2.Text: Game Date: [47 00 61 00 6d 00 65 00 20 00 44 00 61 00 74 00 65 00 3a 00 G.a.m.e. .D.a.t.e.:.]
1.Table.5.TableRow.3.TableCell