Skip to content

Instantly share code, notes, and snippets.

Jason Lewis jasonblewis

Block or report user

Report or block jasonblewis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jasonblewis
jasonblewis / build.pl
Last active Jul 23, 2019
include image
View build.pl
#!/usr/bin/env perl
use Template;
my $DEBUG = 9;
my $tt = Template->new({
INCLUDE_PATH => './',
OUTPUT_PATH => './',
});
my $vars = {
View -
:k-man-badge MODE k-man-badge :+Ri
:NickServ!NickServ@services. NOTICE k-man-badge :This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>.
:freenode-connect!frigg@freenode/utility-bot/frigg NOTICE k-man-badge :Due to the persistent ongoing spam, all new connections are being set +R (block messages from
unidentified users) and will be scanned for vulnerabilities. This will not harm your computer, and vulnerable hosts will be notified.
:freenode-connect!frigg@freenode/utility-bot/frigg PRIVMSG k-man-badge :VERSION
:k-man-badge!~k-man-bad@debian.organictrader.com.au JOIN #badgetest
:verne.freenode.net 353 k-man-badge @ #badgetest :k-man-badge _k-man-badge @k-man
:verne.freenode.net 366 k-man-badge #badgetest :End of /NAMES list.
:_k-man-badge!~k-man-bad@debian.organictrader.com.au QUIT :Read error: Connection reset by peer
< k-man-badge> DEBUG:None:if not empty string RAW: :k-man!~jason@unaffiliated/k-man PRIVMSG #badgetest :hi
View gist:dd5e316c7aa2fbf053a8aa25dbb7a6df
def print_response():
while(client.connected):
client.last_response = client.get_response()
if(client.last_response != ''):
logging.debug("RAW: {}".format(client.last_response))
if "PING" in client.last_response: # Respond to pongs from the server
client.send_pong(client.last_response) # Give the server the timestamped PONG
if "Closing Link" in client.last_response: # Server said goodbye
client.connected = False # So we're disconnected now, thread ends.
try:
View screen.py
import machine, time
from ssd1306 import SSD1306_I2C
WIDTH = const(132)
HEIGHT = const (64)
sda_pin = 21
scl_pin = 22
i2c = machine.I2C(scl=scl_pin, sda=sda_pin, speed=400000)
View switchdebounce.py
import machine
from machine import Timer
# see listing one
# https://www.embedded.com/electronics-blogs/break-points/4024981/My-favorite-software-debouncers
np = machine.Neopixel(15,8,machine.Neopixel.TYPE_RGB)
button = machine.Pin(34,machine.Pin.IN)
check_msec = 20
@jasonblewis
jasonblewis / php7.2.md
Last active May 29, 2018 — forked from w33zy/php7.1.md
How to install php7.1-fpm with EasyEngine
View php7.2.md

How to install php7.2-fpm with EasyEngine


you need to have the php7.0 stack installed

ee stack install --php7

install the nginx stack

ee stack install --nginx

install ee's version of nginx-common

apt install nginx-common=1.10.3-10ppa~stable

View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>lesson3</title>
<meta name="description" content="lesson3">
<meta name="author" content="jbl">
View gist:d050f9c5e22a336b1c3cd59f2ef0c306
<template>
<div id="app" class="column is-half is-offset-one-quarter has-text-centered">
<h1>Buttons!</h1>
<button class="button is-large" v-on:click="buttonClick($event,'G')">g</button>
<button class="button is-large" v-on:click="buttonClick($event,'C')">c</button>
<button class="button is-large" v-on:click="buttonClick($event,'E')">e</button>
<button class="button is-large" v-on:click="buttonClick($event,'A')">a</button>
<button class="button">test</button>
</div>
</template>
@jasonblewis
jasonblewis / build-emacs-snapshot
Last active Sep 5, 2017
build and install emacs snapshot from source on debian stable
View build-emacs-snapshot
#!/bin/bash
# build emacs snapshopt packages form source on debian jessie
# you need to add the the emacs snapshot source to /etc/apt/sources.list.d
# sudo echo deb-src [arch=amd64] http://emacs.secretsauce.net unstable main >> /etc/apt/sources.list.d/emacs-snapshot.list
# wget -q -O - http://emacs.secretsauce.net/key.gpg | sudo apt-key add -
# usage ./build-emacs-snapshot
# enter your sudo password when prompted
# enjoy emacs snapshot.
View booko-tampermonkey.js
// ==UserScript==
// @name booko amazon ISBN link
// @namespace https://emacstragic.net/
// @version 0.1
// @description Make the ISBN-13 a clickable link to booko.
// @author Jason Lewis jason@NOdicksonSPAM.st
// @match https://www.amazon.com/*
// @copyright 2016+, emacstragic.net
// @grant none
// ==/UserScript==
You can’t perform that action at this time.