This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[credential] | |
helper = manager | |
[url "[email protected]:"] | |
pushinsteadof = https://github.com/ | |
[user] | |
name = hidsh | |
email = [email protected] | |
[push] | |
default = simple | |
[core] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// `map' function from arduino | |
// | |
// thx to "http://www.musashinodenpa.com/arduino/ref/index.php?f=0&pos=2743" | |
#include <stdio.h> | |
#define MAP(x, in_min, in_max, out_min, out_max) \ | |
((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min) | |
typedef __int16_t int16_t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ori () | |
"original") | |
(defun modi () | |
"modi") | |
(ori) ; => "original" | |
(modi) ; => "modi" | |
(setf (symbol-function 'ori) (symbol-function 'modi)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ori () | |
"original") | |
(defun modi () | |
"modi") | |
(ori) ; => "original" | |
(modi) ; => "modi" | |
(letf (((symbol-function 'ori) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- coding:utf-8; mode:emacs-lisp -*- | |
;;; | |
;;; ~/.emacs.d/dot.emacs | |
;;; | |
;;; $ ln -s ~/.emacs.d/dot.emacs ~/.emacs | |
;;; | |
;; | |
;; functionalities to backup/restore init files | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; why doesn't exist this feature | |
(defun counsel-rg-at-point () | |
(interactive) | |
(counsel-rg (symbol-name (symbol-at-point)))) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun test-break () | |
(let ((s "")) | |
(if (catch 'break | |
(dolist (f l) | |
(if (string= f "foo") (throw 'break nil)) | |
(setq s (concat s f " "))) | |
t) | |
(message "success: %s" s) | |
(message "fail: %s" s)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define JOY_X A0 | |
#define JOY_Y A1 | |
void setup() { | |
pinMode(JOY_X, INPUT); | |
pinMode(JOY_Y, INPUT); | |
Serial.begin(38400); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define JOY_L_X A0 | |
#define JOY_L_Y A1 | |
void setup() { | |
pinMode(JOY_L_X, INPUT); | |
pinMode(JOY_L_Y, INPUT); | |
Serial.begin(38400); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define JOY_L_X A0 | |
#define JOY_L_Y A1 | |
#define ZERO_THRESH 10 | |
#define MAX 490 | |
void setup() { | |
pinMode(JOY_L_X, INPUT); | |
pinMode(JOY_L_Y, INPUT); |