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
/* | |
Blink | |
Turns an LED on for one second, then off for one second, repeatedly. | |
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO | |
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to | |
the correct LED pin independent of which board is used. | |
If you want to know what pin the on-board LED is connected to on your Arduino | |
model, check the Technical Specs of your board at: |
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
#!/bin/sh | |
if [ $# -ne 1 ]; then | |
echo "Usage: chkusb.sh STRING" | |
exit | |
fi | |
while [ 1 ]; do | |
ret=`lsusb | grep "$1"` | |
if [ -z "$ret" ]; then |
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
;; | |
;; Generation de polygones reguliers sur les Arcs , Cercles et Arcs dans Polylignes | |
;; | |
;; Les XDatas sont copiees sur la nouvelle polyligne. | |
;; | |
;; Routine: ARC2SEG vers 1.03 par Gilles (gile) le 10 Nov 2008 | |
;; Transforme les arcs, cercles et polyarcs en polylignes constituees de segments droits | |
;; | |
;; 1 - Correction du bug sur les arcs > 180 degres | |
;; |
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
❯❯❯ gcc variable_length_arg_func.c && ./a.out | |
var:01 | |
var1:11 var2:12 | |
var1:F1 var2:F2 var3:F3 |
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
#!/usr/bin/python | |
# changing filename of gerber files | |
# usage: | |
# $ cd GERBER-FOLDER | |
# $ kicad-rename.py | |
# | |
# equivalent to following commands: | |
# mv hoge-F_Cu.gtl hoge.gtl | |
# mv hoge-F_Mask.gts hoge.gts |
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
[url "[email protected]:"] | |
pushinsteadof = https://github.com/ | |
[user] | |
name = hidsh | |
email = [email protected] | |
[push] | |
default = simple | |
[core] | |
editor = vim -u NONE -c \"set fenc=utf-8\" | |
whitespace = cr-at-eol |
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
-- Scrolling by Middle button + TrackPoint with SK-8855 (ThinkPad USB Keyboard With TrackPoint) on Mojave | |
-- save as: ~/.hammerspoon/init.lua | |
-- | |
-- HANDLE SCROLLING | |
local deferred = false | |
overrideMiddleMouseDown = hs.eventtap.new({ hs.eventtap.event.types.middleMouseDown }, function(e) | |
--print("down")) | |
deferred = true |
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
// what we will probably want is: | |
// (*p)++; == v++; | |
#include <stdio.h> | |
void print_arr(int a[]) | |
{ | |
for(int i=0; i<3; i++) { | |
printf("%d\n", a[i]); | |
} | |
} |
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
// all the same: | |
// *p++ = x | |
// *(p)++ = x | |
// *(p++) = x | |
// | |
#include <stdio.h> | |
void print_arr(int a[]) | |
{ | |
for(int i=0; i<3; i++) { |
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
#!/bin/sh | |
# | |
# Rename gerber-files from KiCAD to place an order to `elecrow.com` | |
# | |
# This script is fully based on renamer_elecrow.sh by tnishinaga: https://gist.github.com/tnishinaga/feeb86415ecf977a59615baa9846e4e0 | |
# THX! | |
# | |
usage() | |
{ | |
echo "Rename gerber-files from KiCAD according to elecrow.com's order-rules" |