Skip to content

Instantly share code, notes, and snippets.

View crabcrabcam's full-sized avatar

MxCraven crabcrabcam

View GitHub Profile
@crabcrabcam
crabcrabcam / screenshotHere.sh
Created July 14, 2017 20:39
Sets the GNOME-screenshot utility to auto save to the current directory (whatever the script is ran from)
here=$(pwd)
gsettings set org.gnome.gnome-screenshot auto-save-directory "file://$here/"
echo "Set"
echo "file://$here/"
@crabcrabcam
crabcrabcam / sorter.py
Created June 15, 2017 10:08 — forked from anonymous/sorter.py
A really quick and dirty sorter for @robmanuel
print("Give me a path")
path = input()
file_object = open(path, "r")
keepers = []
losers = []
for line in file_object:
while True:
@crabcrabcam
crabcrabcam / Main.py
Created June 8, 2017 09:19
Python code for a wallboard
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMessageBox
from MainDes import Ui_MainWindow
class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
QtWidgets.QWidget.__init__(self, parent)
self.setupUi(self)
@crabcrabcam
crabcrabcam / CamDarkGeany.conf
Last active August 14, 2017 11:09
Dark theme for Geany
#Copyright 2017 Cameron Reid <cameron[at]camreid[dot]co[dot]uk>
#
#Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
#1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
#2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
#3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
@crabcrabcam
crabcrabcam / Making tea.psu
Created April 4, 2017 12:55
Making some tea with Psudocode
#Making tea
getStuffReady(stuff: [teaBag, teaCup, kettle, water, milk, sugar,
spoon])
kettle.boil()
teaBag.put(in: teaCup)
while (kettle.water.state != boiled) {
wait(for: "boiledWater")
}
using System.Collections;
using System.Collections.Generic;
using System;
using System.IO;
using System.Threading;
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
@crabcrabcam
crabcrabcam / Orders.sql
Created December 14, 2016 14:40
Average orders. Not grouping
SELECT Orders.OrderID, Orders.CustomerID, Customers.CompanyName, COUNT(Orders.CustomerID) AS 'OrderCount' FROM Orders
INNER JOIN Customers
ON Customers.CustomerID = Orders.CustomerID
GROUP BY Orders.OrderID, Orders.CustomerID, Customers.CompanyName, Customers.CustomerID
@crabcrabcam
crabcrabcam / createtable.SQL
Created December 14, 2016 10:39
Create table, name goes blue
CREATE TABLE mythicalBeasts
(
Name NVARCHAR(30),
Century TinyInt,
Details NVARCHAR(255)
)
@crabcrabcam
crabcrabcam / Subquery.sql
Created December 13, 2016 15:38
Subquery inc. Freight
SELECT Customers.CustomerID, Customers.CompanyName, Orders.Freight FROM Customers
INNER JOIN Orders
ON Customers.CustomerID = Orders.CustomerID
WHERE Customers.CustomerID IN
(SELECT CustomerID FROM Orders WHERE Freight > 500)
@crabcrabcam
crabcrabcam / Get Regions.sqlwhateverthing
Created December 13, 2016 10:00
Gets regions by ID and all that
-- Define the database to use
USE ExSQL7
-- Gets all the parts I want and joins them together and links them.
SELECT Region.RegionID, Territories.TerritoryID, Region.RegionDescription, Territories.TerritoryDescription FROM Region
INNER JOIN Territories
ON Territories.RegionID = Region.RegionID
ORDER BY RegionDescription, TerritoryDescription