Skip to content

Instantly share code, notes, and snippets.

View idmontie's full-sized avatar

Ivan Montiel idmontie

View GitHub Profile
@idmontie
idmontie / glitch.html
Last active June 15, 2022 12:42
Glitch Text Effect with CSS
<!doctype html>
<html>
<head>
<!-- Based on http://codepen.io/lbebber/pen/ypgql -->
<link href="http://necolas.github.io/normalize.css/3.0.2/normalize.css" rel='stylesheet'/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<style>
/* Just colors and font sizes */
* {
font-family: sans-serif;
@idmontie
idmontie / check_mic.py
Last active November 26, 2020 01:36
Testing Matrix Voice
import pyaudio
p = pyaudio.PyAudio()
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
print("Input Device id ", i, " - ",
p.get_device_info_by_host_api_device_index(0, i).get('name'))
@idmontie
idmontie / temp.py
Created November 23, 2020 17:47
Run a GPIO pin based on temp
'''
Run an efficient loop that checks on the RP2 temperature every second.
If the tempt exceeds a threshold, turn the fan on until the next check.
pip install gpiozero
'''
from gpiozero import LED
from time import sleep
@idmontie
idmontie / wired-link-underlines.css
Created March 4, 2015 22:18
Wired Style A Tag Underlines
@idmontie
idmontie / SimpleLoanCalculator.md
Last active July 11, 2020 18:28
Simple Loan Calculator

Simple loan calulator, just run in the browser

@idmontie
idmontie / index.js
Created June 6, 2019 18:06
Intercom webhook signature validation
const express = require('express');
const bodyParser = require('body-parser');
const crypto = require('crypto');
const serverless = require('serverless-http');
const app = express();
const KEY = 'YOUR_KEY';
app.use(bodyParser.raw({
type: '*/*',
@idmontie
idmontie / todo.md
Created March 8, 2019 21:19
TODO.md template for VS Code TODO Plugin

Key ☐ incomplete · ✔ completed · ✘ canceled

Title: ☐ Item 1 ☐ Item 2

export default class Toggle extends Component {
static TOGGLE = 'TOGGLE';
state = { on: false }
onClick = (e) => {
e.preventDefault();
this.internalSetState(state => ({
on: !state.on,
class App extends Component {
stateReducer = (prevState, nextState) => {
switch (nextState.type) {
case Toggle.TOGGLE: {
const count = prevState.count || 0;
const isOn = count < 4 ? nextState.on : false;
return {
...prevState,
...nextState,
(state, action) => {
switch (action.type) {
case TOGGLE: {
const count = state.count || 0;
const isOn = count < 4 ? action.changes.on : false;
return {
...state,
...action.changes,
count: isOn ? count + 1 : count,