Skip to content

Instantly share code, notes, and snippets.

/**
* depth: 1 - monochrome
* 4 - 4-bit grayscale
* 8 - 8-bit grayscale
* 16 - 16-bit colour
* 32 - 32-bit colour
**/
function drawArray(arr, depth) {
var offset, height, data, image;

sync-settings.atom.io.mautematico.md

I hope this gist to contain my relevant atom.io settings and config.

I'm currently using http://atom.io/packages/sync-settings to sync this gist between my computers.

@mautematico
mautematico / gist:56457a9c84d6d2d88dab
Created October 12, 2015 04:54 — forked from matthewhudson/gist:1603502
Integrate Open Graph with Tumblr
<!-- Open Graph tags for your home page (index). -->
<meta property="og:site_name" content="{Title}" />
<meta property="fb:app_id" content="FACEBOOK_APPID"/>
<meta property="fb:admins" content="FACEBOOK_USERID" />
<meta property="og:description" content="{MetaDescription}" />
<meta property="og:locale" content="en_US" />
{block:IndexPage}
<meta property="og:image" content="{PortraitURL-128}" />
<meta property="og:title" content="{Title}" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!--[if lt IE 9]>
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
#!/bin/bash
cat posts.json | jq -c -M '.[]' | sed 's/\\"/\\\\"/g' | \
while read single_post;
do
post_id=$(echo $single_post | jq '.ID');
echo $single_post > post/$post_id.json;
done
echo "done"
@mautematico
mautematico / README.md
Created February 19, 2016 22:22 — forked from zhuochun/README.md
List all posts, tags and categories in Jekyll. https://github.com/zhuochun/md-writer

List all posts, tags and categories in Jekyll.

Octopress users: if you found " is escaped in the generated JSON file, please change them to \". Refer to this issue.

@mautematico
mautematico / gist:1e8bad73f6d020774577ad500d0c49e2
Created May 30, 2016 20:33 — forked from kixorz/gist:5281510
Zabbix 2.0+ temperature monitoring configuration using IPMI
#zabbix user needs to be in /etc/sudoers to be able to execute ipmitool
zabbix ALL=NOPASSWD: /usr/bin/ipmitool
#zabbix config has to collect desired UserParameters
UserParameter=ipmi.ambient_temp,sudo ipmitool sdr | grep "Ambient" | awk '{print $3}' | head -1
UserParameter=ipmi.cpu_temp,sudo ipmitool sdr | grep "CPU" | awk '{print $3}' | head -1
UserParameter=ipmi.cpu_fan,sudo ipmitool sdr | grep -i "FAN1 SYS" | awk '{print $4}' | head -1
UserParameter=ipmi.cpu_fan_status,sudo ipmitool sdr | grep -i "FAN1 SYS" | awk '{print $7}' | head -1
#after restart of zabbix_agentd, collected values can be tested via

Keybase proof

I hereby claim:

  • I am mautematico on github.
  • I am mautematico (https://keybase.io/mautematico) on keybase.
  • I have a public key ASB9dApwpEOvWD_vep98TetnQLSAy4hdB6glBagckv7_Wgo

To claim this, I am signing this object:

@mautematico
mautematico / autoautoptimize.php
Last active March 5, 2017 16:36 — forked from roytanck/autoautoptimize.php
Auto-configure Autoptimize across a WordPress network
<?php
/**
* Plugin Name: RT Autoautoptimize
* Plugin URI: https://gist.github.com/roytanck/e5e38d2955140b36da7e
* Description: Automatically configures default settings for the Autoptimize plugin across a WordPress network
* Version: 0.9
* Author: Roy Tanck
* Author URI: http://www.this-play.nl
* License: GPL2
*/
@mautematico
mautematico / TICKET.vb
Created July 23, 2018 22:55
Tickets MyBusiness POS
Sub Main()
Dim rstSeries
'Ambiente.Torreta.PortOpen = False
'Ambiente.Torreta.Settings = "9600,N,8,1"
'Ambiente.Torreta.RTSEnable = True
'Ambiente.Torreta.PortOpen = True
'Ambiente.Torreta.CommPort = 1
'Ambiente.Torreta.OutPut = "ABC"
'Eventos