Skip to content

Instantly share code, notes, and snippets.

View S64's full-sized avatar

Shuma Yoshioka S64

View GitHub Profile
@sabas1080
sabas1080 / ESP32_HID.ino
Last active January 28, 2024 10:34
Example of HID Keyboard BLE with ESP32
View ESP32_HID.ino
/*
Copyright (c) 2014-2020 Electronic Cats SAPI de CV. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 5, 2023 20:54
UPM: How to make a custom package
View 1.md

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

@keithpitty
keithpitty / tmux-ngrok.md
Last active December 15, 2023 16:24
Pairing with tmux and ngrok
View tmux-ngrok.md

Steps for Remote Pairing using tmux and ngrok

The following steps facilitate remote pairing using:

  • tmux which allows terminal sessions to be attached to different terminals, and
  • ngrok which provides secure tunnels to your localhost

1. Install tmux

OS X: brew install tmux

@DanCouper
DanCouper / patterngrid
Created April 8, 2015 14:58
Use of SVG pattern to create a PS-like transparency grid
View patterngrid
<!-- http://mike.eire.ca/2010/02/25/easy-svg-grid/ -->
<!-- "I needed a grid in the background while I was debugging an SVG image I was creating, something like Photoshop’s transparency grid. Here’s what I did." -->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="400">
<defs>
<pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse">
<rect fill="black" x="0" y="0" width="10" height="10" opacity="0.1"/>
<rect fill="white" x="10" y="0" width="10" height="10"/>
<rect fill="black" x="10" y="10" width="10" height="10" opacity="0.1"/>
<rect fill="white" x="0" y="10" width="10" height="10"/>
@masuidrive
masuidrive / main.js
Last active May 5, 2023 17:54
Google SpreadsheetからBigQueryを呼び出すスクリプト
View main.js
/**
* Google Spreadsheet向けBigQuery取り込みスクリプト
* http://toreta.blog.jp/archives/20649904.html
* License: MIT 2014- Toreta, Inc.
*
* runAllQueries() をトリガーで毎日実行してください
* Queries, Single row queries, Dataの三つのシートを作って下さい
* Queries, Single row queriesのシートには実行するクエリを書きます
* A列にクエリ名、B列にクエリです。
* conuntなどの集約関数で1行しか返らないクエリは「Single row queries」、それ以外は「Queries」に書いて下さい
View gist:3b19447b304616f18657
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@egslava
egslava / WrapContentHeightViewPager.java
Created August 12, 2014 12:28
Wrap content height ViewPager (Android)
View WrapContentHeightViewPager.java
package org.cnii.layoutloader.ui;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;
/**
* Special thanks to Daniel López Lacalle for his response
* (http://stackoverflow.com/questions/8394681/android-i-am-unable-to-have-viewpager-wrap-content/20784791#20784791)
View 標本数の決め方について調べてみる.md
@lukewpatterson
lukewpatterson / gist:4242707
Created December 9, 2012 00:24
squeezing private SSH key into .travis.yml file
View gist:4242707
Tricks to add encrypted private SSH key to .travis.yml file
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_
@jugyo
jugyo / gist:3882497
Created October 13, 2012 00:16
nginx + ngx_lua on Mac
View gist:3882497