Skip to content

Instantly share code, notes, and snippets.

View mattkenefick's full-sized avatar
🏠
Working from home

Matt Kenefick mattkenefick

🏠
Working from home
View GitHub Profile
@mattkenefick
mattkenefick / gist:12e2b9829d59e74b2071
Created May 8, 2015 14:41
TamperMonkey Asana three-panes width fix
// ==UserScript==
// @name Fix Asana width
// @namespace http://example.com
// @version 0.1
// @description Forced width of Asana is very obnoxius, so this will adjust the min width.
// @author You
// @match https://app.asana.com/*
// @grant none
// ==/UserScript==
# pulls current branch you're on
# commits any code if you add a string
# pushes committed code to branch you're on
#
# e.g.
# giddyup (pulls branch only)
# giddyup "My Message" (pulls, commits "My Message", pushes changes)
#
giddyup() {
@mattkenefick
mattkenefick / gist:7e565607c9656ad81d4d
Last active March 13, 2022 10:39
Bash CRUD (Get,Post,Put,Delete) Commands
# Polymer Mallard - Bash CRUD
#
# Put the following into your ~/.bash_rc or ~/.bash_profile
# Requires Python, cURL
function pmCrudRequest {
printf " \n \e[1;33m$method\e[0m from \e[1;33m$url\e[0m \n \n"
printf " \n \e[0;32m"
echo "$response" | python -m json.tool
printf "\e[0m"
screen = CreateObject("roScreen")
bitmap = CreateObject("roBitmap", { width: 200, height: 200, alphaEnable: false })
' create rectangle shape
bitmap.drawRect(0, 0, 200, 200, &h67827fFF)
' get full bytearray and save raw
byteArray = bitmap.getByteArray(0, 0, 200, 200)
byteArray.writeFile("tmp:/12345.bmp")
@mattkenefick
mattkenefick / jpg_encoder.cpp
Created December 17, 2015 20:41
Sanity Check
#include <Magick++.h>
#include <fstream.h>
#include <math.h>
#include <sys/time.h>
#include <unistd.h>
using namespace Magick;
fstream fout;
<?php
$stuff = "Something!";
?>
<head>
<title><?php echo $stuff ?></title>
<style>
<?php echo ".foo { bar: 10px }" ?>
</style>
</head>
<body></body>
Re-usable separated templates via backend, frontend, lang files, with heirarchy.
views
└ comments
└ single.twig
└ video
└ player.twig
└ templates.twig
--------
Usage
--------
# Creates a background screen with a name `make-assets` that runs the command `gulp watch`
# Can be found by running `screen -list` and resuming.
# You can change this name to be whatever you want instead of `make-assets`
@mattkenefick
mattkenefick / bash_profile.sh
Last active June 29, 2016 01:24
`projects` for bash
##
# Projects
#
# Put somewhere in your bashrc, bash_profile, or whatever you're sourcing
# and edit the `project_source` line to link to an ENV file representing
# your projects:
#
# roku=~/WhateverDirectory/
# projectb=/var/www/project_b
#
@mattkenefick
mattkenefick / .build-env
Last active January 10, 2021 03:58
Roku build environment variables
######################################################
# DO NOT COMMIT CHANGES FROM THIS FILE
# USE `.build-env-override` for local changes
######################################################
env=dev
theme=myapp
roku_ip=192.168.1.200
roku_port=8085
roku_password=roku