wrote this for a pretty specific purpose but if you wanted to attempt to fairly/randomly schedule four people weekly shifts and avoid the same employee having the shift two weeks in a row and also generate a calendar at the same time, here you go
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
apt update && apt upgrade -y && apt install -y apt-transport-https ca-certificates curl software-properties-common && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" && apt install docker-ce -y |
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
var ExifImage = require('exif').ExifImage; | |
var image = 'DSC_8041.jpg'; | |
// Step 5, send data off | |
function finish(EXIF) { | |
console.log(`Finished EXIF: ` + JSON.stringify(EXIF)); | |
return EXIF; | |
} | |
// Step 4, reformat data |
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
// This was made to convert shutter speeds from node-exif from decimals of a second to fractions of a second. | |
// Example: 0.00125 converts to 1/800 | |
var input = "0.00125"; | |
function doMath(result, string) { | |
console.log(`${string} is ${result[0]}/${result[1]}th of a second`); | |
return result; | |
} |
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
<?php | |
/** | |
* Package: Scrobbl.in Core (http://github.com/cxdy/Scrobbl.in) | |
* Version: 2.0 | |
* Authors: Cody Kaczynski (http://github.com/cxdy) | |
* License: MIT License (http://opensource.org/licenses/MIT) | |
* You can obtain a Last.FM API key at http://www.last.fm/api/account/create | |
* Read the documentation (https://github.com/cxdy/Scrobbl.in/blob/master/README.md) | |
**/ |
I hereby claim:
- I am cxdy on github.
- I am cxdy (https://keybase.io/cxdy) on keybase.
- I have a public key whose fingerprint is B4EC 2AE4 9B6A 82CC CC90 018C 8C03 06AE 682E 59A7
To claim this, I am signing this object:
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 requests, sys | |
# This program shows the simplicity | |
# of requests, Best library ever. | |
sqlcheck = ["SQL error:", "Warning:", "supplied argument", "PHP Warning:"] | |
if len(sys.argv) == 1: | |
print "usage: sqli.py http://hostname.com/" | |
exit(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
<div class="lastfm"></div> | |
<script> | |
var scrobblinRefreshTimer = 10; | |
var scrobblinFileLocation = 'scrobblin.php'; | |
$(document).ready(function() { | |
refreshScrobblin(); | |
setInterval(function() { refreshScrobblin() }, scrobblinRefreshTimer * 1000); |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace SimpleCalculator |
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
// Load the http module to create an http server. | |
var http = require('http'); | |
// Configure our HTTP server to respond with Hello World to all requests. | |
var server = http.createServer(function (request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.end("Hello World\n"); | |
}); | |
// Listen on port 8000, IP defaults to 127.0.0.1 |
NewerOlder