Skip to content

Instantly share code, notes, and snippets.

Avatar

Fred Warren fwarren

View GitHub Profile
@fwarren
fwarren / imreceived.py
Created Jun 4, 2020
Python 2 dbus pidgin IM indicator
View imreceived.py
#!/usr/bin/python2
#
# simple d-busified evolution mail notifier
#
# notifies you about incoming mail with a sound and
# displays a tray icon in the notification area until
# you read some message in evolution again
#
# Thomas Perl <thp@thpinfo.com> 2007-03-28
#
@fwarren
fwarren / filewalker.py
Last active Oct 5, 2017
Find all files in filetree that have null signatures
View filewalker.py
#!/usr/bin/python2
# Import the os module, for the os.walk function
import os
# Set the directory you want to start from
rootDir = '/cygdrive/d/Tank/Shares'
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
@fwarren
fwarren / file_dir_hash.php
Created Sep 2, 2017
File Hash to multiple Subdirectoris
View file_dir_hash.php
<?php
// https://stackoverflow.com/questions/23787785/how-to-use-hash-function-for-storing-4-million-images-in-file-system
// $id = A unique identifier (a filename)
// It could be useful to make this id the same for the original,
// as well as any thumbnails. Your image and variants will all
// then end up in the same directory.
// $levels_deep = The number of directories deep you want to go.
// Want more levels? Use a hashing method with a longer
@fwarren
fwarren / imreceived.py
Last active Aug 25, 2017
Python Finch dbus message notifier
View imreceived.py
#!/usr/bin/python2
#
# simple d-busified evolution mail notifier
#
# notifies you about incoming mail with a sound and
# displays a tray icon in the notification area until
# you read some message in evolution again
#
# Thomas Perl <thp@thpinfo.com> 2007-03-28
#
@fwarren
fwarren / employee_birthday.sql
Last active Aug 22, 2017
List Employee Birthdays and Anniversaries.
View employee_birthday.sql
SELECT e.LastName, e.FirstName,
CASE WHEN c.EmpGCstF1 = 1 THEN 0 ELSE 1 END AS 'Birthday', e.BirthDate,
CASE WHEN c.EmpGCstF2 = 1 THEN 0 ELSE 1 END AS 'Anniversary', e.HireDate
FROM Employee e
LEFT JOIN EmpCstFV c ON e.EmpUID = c.EmpUID AND c.CstID = 105
WHERE e.CompanyID = 6
AND e.TermDate IS NULL
ORDER BY e.LastName, e.FirstName
@fwarren
fwarren / fb_inventory.html
Last active Jul 13, 2017
Fishbowl Inventory Client for ie6 mobile
View fb_inventory.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="jquery-1.12.4.min.js"></script>
<!--[if lt IE 9]>
<script src="html5shiv.min.js"></script>
<script src="respond.min.js"></script>
You can’t perform that action at this time.