Skip to content

Instantly share code, notes, and snippets.

View pollend's full-sized avatar
:octocat:
working on random stuff

Michael Pollind pollend

:octocat:
working on random stuff
View GitHub Profile
// Simple build file for modules - the one under the Core module is the template, will be copied as needed to modules
// Grab all the common stuff like plugins to use, artifact repositories, code analysis config, Artifactory settings, Git magic
apply from: "$rootDir/config/gradle/artifactory.gradle"
import groovy.json.JsonSlurper
import java.text.SimpleDateFormat;
// Git plugin details at https://github.com/ajoberstar/gradle-git
import org.ajoberstar.gradle.git.tasks.*
@pollend
pollend / gist:c7d490d775b9b56ead2c4d506a04c8cd
Created January 7, 2018 06:43 — forked from therealmuthu/iteration2.md
Review Terasology Homepage Spec | GCI 2017

First off, great job with the material design of the spec. It feels very intuitive to scroll through and improves upon the tad bit dated look of the current homepage. I love how key words are highlighted and bolded in order to make skimming through the site(which is what most visitors do) really easy. I see why you didn't include the fact that it's "like an open-source minecraft", but I think that line is key for users to understand Terasology and it's purpose. It's also great that you have seperate links for developers and players(with a nice description for both that fits in with the vibe of Terasology). In the description for developer, you say "the developer would want to know how to get started developing Terasology?". Why the question mark? Have a firm stance, no doubts. The current Terasology page provides a lot of information that is densly packed together, and gives off a dull vibe. This spec is very good at giving only necessary information and has a vibrant look and feel that goes hand in hand with

@pollend
pollend / read_accel.py
Created January 8, 2018 06:40 — forked from nudomarinero/read_accel.py
Get the acceleration data of a LightBlue Bean using Python
from __future__ import print_function
from bluetooth.ble import GATTRequester
from time import sleep
def get_accel(data):
"""
Get the acceleration values from the data
TODO: Add CRC check
See: http://legacy.punchthrough.com/bean/the-arduino-reference/accelerationreading/
"""
let lightblue = require("bean-sdk/src/lightblue")
const commandIds = require('bean-sdk/src/command-definitions').commandIds
let sdk = lightblue.sdk()
sdk.on('discover', (scannedDevice)=> {
if(scannedDevice.getAddress() === process.argv[2]) {
// We now have a `ScannedDevice` object, found in src/lightblue/devices.js
console.log(`\nFound device with name/address: ${scannedDevice.getName()}/${scannedDevice.getAddress()}`)
sdk.stopScanning()
var fs = require('fs');
var request = require('request');
KEYWORD = 'countertop'
DIRECTORY = './countertop/'
if (!fs.existsSync(DIRECTORY)) {
fs.mkdirSync(DIRECTORY, 0744);
import gatt
manager = gatt.DeviceManager(adapter_name='hci0')
SerialPortUUID = "0000dfb1-0000-1000-8000-00805f9b34fb";
CommandUUID = "0000dfb2-0000-1000-8000-00805f9b34fb";
ModelNumberStringUUID = "00002a24-0000-1000-8000-00805f9b34fb";
class AnyDevice(gatt.Device):
def connect_succeeded(self):
@pollend
pollend / image_normalize.py
Last active January 17, 2018 23:08
normalizes a dirctory of images and convert them all to png and removes duplicate
import hashlib
import os
from PIL import Image
def process_directory(dir):
hashes = []
os.mkdir('./' + dir + "_final")
for file in os.listdir('./' + dir):
f = os.path.join('./' +dir, file)
@pollend
pollend / data.sh
Last active January 27, 2018 19:01
collects funding history from nsf and transforms into csv
rm -rf ./data
mkdir data
cd data
for key in $(curl https://www.nsf.gov/awardsearch/download.jsp | grep -oP "download\?DownloadFileName=[0-9]+\&All=true"); do
wget --content-disposition https://www.nsf.gov/awardsearch/$key
done
@pollend
pollend / jquery-3.3.1.min.js
Last active February 3, 2018 10:10
scrapes SJR using nightmare
/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\