Skip to content

Instantly share code, notes, and snippets.

View juanedi's full-sized avatar

Juan Edi juanedi

View GitHub Profile
@juanedi
juanedi / eslint-spacemacs.el
Last active August 24, 2017 06:48
ESLint integration in spacemacs
(defun jedi//detect-eslint-executable ()
(let* ((root (locate-dominating-file
(or (buffer-file-name) default-directory)
"node_modules"))
(local-eslint-d (expand-file-name "node_modules/.bin/eslint_d" root))
(local-eslint (expand-file-name "node_modules/.bin/eslint" root))
(global-eslint (executable-find "eslint"))
(eslint (seq-find 'file-executable-p (list local-eslint-d
local-eslint

Keybase proof

I hereby claim:

  • I am juanedi on github.
  • I am juanedi (https://keybase.io/juanedi) on keybase.
  • I have a public key whose fingerprint is EA85 F461 5365 5BEF BC46 A535 E4D6 E97D 885D 8157

To claim this, I am signing this object:

@juanedi
juanedi / foldlBreak.hs
Last active August 29, 2015 14:20
foldlBreak
{-
implementación de fold' según https://wiki.haskell.org/Foldr_Foldl_Foldl'
-}
foldl' :: (b -> a -> b) -> b -> [a] -> b
foldl' f z [] = z
foldl' f z (x:xs) = let z' = f z x
in seq z' $ foldl' f z' xs
{-
@juanedi
juanedi / gist:54f798945e51896c2db2
Created March 5, 2015 14:20
raspi network monitor
#! /bin/bash
check_wlan0 () {
return `ifconfig wlan0 | grep -q "inet addr:"`
}
if ! check_wlan0 ; then
sudo ifup --force wlan0
fi
@juanedi
juanedi / gist:5c8764b30ae6e1ef9121
Created January 13, 2015 18:09
Read GPS coordinates form serial port
package com.cepheid.genexpert.reporter;
import gnu.io.CommPortIdentifier;
import gnu.io.SerialPort;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.Enumeration;