Skip to content

Instantly share code, notes, and snippets.

@LaloHao
LaloHao / pic16f887.org
Created September 1, 2020 12:32
PIC16F887 registers

FIGURE 2-6: PIC16F887 SPECIAL FUNCTION REGISTERS

<c><7><c><7><c><7><c><7>
FileFileFileFile
AddressAddressAddressAddress
(1)00h(1)80h(1)100h(1)180h
TMR001hOPTION_REG81hTMR0101hOPTION_REG181h
PCL02hPCL82hPCL102hPCL182h
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs) ecl gcc readline stdenv writeTextFile;
inherit (builtins) fetchurl;
in stdenv.mkDerivation rec {
name = "ecl-readline";
version = "0.4.1";
buildInputs = [
gcc readline ecl
];
;;; lenses.el --- -*- lexical-binding: t; -*-
;; Copyright (C) 2019 Eduardo V.
;; Author: Eduardo V. <lalo@hao.systems>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@LaloHao
LaloHao / duplicates.js
Created January 30, 2019 21:47
Return an array of `keys` for which their `value` in `object` are duplicates
// Return an array of `keys` for which their `value` in `object` are duplicates
function duplicates(object) {
const keys = Object.keys(object);
const values = keys.map(k => object[k]);
const arr = keys.map(key => ({ key, value: object[key] }));
const _duplicates = new Set();
let possibleDuplicate;
for (const v of values) {
possibleDuplicate = arr.filter(a => a.value === v);
@LaloHao
LaloHao / eslint-pushed-changes.sh
Created September 5, 2018 12:51 — forked from stalniy/eslint-pushed-changes.sh
ESLINT + pre-receive git hook
#!/bin/bash
TEMPDIR=`mktemp -d`
ESLINTRC=$TEMPDIR/.eslintrc
COMMAND="eslint --color -c $ESLINTRC --rule 'import/no-unresolved: 0' --rule 'import/no-duplicates: 0' --rule 'import/export: 0'"
git show HEAD:.eslintrc > $ESLINTRC
echo "### Ensure changes follow our code style... ####"
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive
@LaloHao
LaloHao / elnode-ijs.el
Created June 8, 2018 00:05 — forked from nicferrier/elnode-ijs.el
A complete javascript shell with elnode. It's pretty simple obviously and there's a lot of return value hacking to do. It's quite interesting that this stuff is so easy though. I think it might be a useful addition to any elnode project to map in a handler that let you control the javascript from the elnode emacs instance.
;;; interactive javascript shell with elnode -*- lexical-binding: t -*-
(elnode-app elnode-ijs-dir comint uuid)
(defvar elnode-ijs/input nil
"Input for the js shell.
Each element is a cons of a uuid and the javascript to send.")
(defvar elnode-ijs/input-hash (make-hash-table :test 'equal)
import React, { Component } from 'react';
import {
View,
Text,
TouchableOpacity
} from 'react-native';
import ModalTester from './ModalTester.js';
url = https://github.com/Dewdrops/powerline
;;; Init.el --- Configuración personal.
;;; Commentary:
;;; Code:
(defun toggle-window-split ()
(interactive)
(if (= (count-windows) 2)
(let* ((this-win-buffer (window-buffer))
(next-win-buffer (window-buffer (next-window)))
(this-win-edges (window-edges (selected-window)))
;; -*- mode: stumpwm -*-
(in-package :stumpwm)
(set-prefix-key (kbd "s-t"))
;; (setf *window-border-style* :none)
;; (ql:quickload :xembed)
;; (load-module "stumptray")
;; (run-commands "stumptray")