Skip to content

Instantly share code, notes, and snippets.

@ajfisher
ajfisher / _readme.md
Last active November 21, 2023 16:28
Auto WiFi detection and hotspot creation in boot for RPI

Auto WiFi detection or wifi hostpot creation during boot for RPI

Note: These are rough notes and there may be some variance as versions of raspbian get updated but should be pretty reliable as a guide.

This gist provides some instructions and config in order to have your Raspberry PI automatically connect to a roamed network, however if it fails to discover an available network it will set itself up as a wireless access point for you to connect to.

@Overbryd
Overbryd / repair.md
Last active April 4, 2016 08:06
MacBook Pro repair level: Christmas Cookies

Issue

My display stopped working, showed weird patterns and shut off at random. My graphics basically looked like striped christmas wrapping. I got a 15" MacBook Pro Late 2011 model.

Solution

Some googling for the issue on my iPad showed that baking my logic board, as weird as it sounds, might actually be the solution. Since it was a dead logic board in my eyes, I was willing to give it a try. Correctly put, this process should reflow some of the solder on the logic board and connect it properly.

And later I found out these video issues are a thing, thus Apple offering a repair for these models. If you happen to have this video problems: You might want to turn it in at your local Apple repair store.

@tanyuan
tanyuan / smart-caps-lock.md
Last active November 30, 2025 15:58
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@seanbehan
seanbehan / upload-files-with-flask.md
Last active June 4, 2018 21:08
upload files to s3 with flask, PIL and tinys3

HTML form for file uploads

<!-- in templates/form.html -->
<form action="/upload" method="POST" enctype="multipart/form-data">
 <input type="file" name="logo">
 <button>Upload</button>
</form>
@zoernert
zoernert / microdao.abi
Last active June 19, 2017 10:13
Micro DAO to create an EVU in Germany
[ { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string", "value": "MicroDAO" } ], "type": "function" }, { "constant": false, "inputs": [], "name": "executeSpendingRequests", "outputs": [], "type": "function" }, { "constant": false, "inputs": [ { "name": "number_of_days", "type": "uint256" }, { "name": "requiredShares", "type": "uint256" } ], "name": "setDirectorLock", "outputs": [], "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "bookings", "outputs": [ { "name": "time", "type": "uint256" }, { "name": "funding", "type": "uint256" }, { "name": "spending", "type": "uint256" }, { "name": "counterpart", "type": "address" }, { "name": "text", "type": "string" } ], "type": "function" }, { "constant": false, "inputs": [], "name": "closeFunding", "outputs": [], "type": "function" }, { "constant": false, "inputs": [ { "name": "node", "type": "string" } ], "name": "setDirectorNode", "outputs": [], "type": "function" }, { "consta
@roylee0704
roylee0704 / dockergrep.sh
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
var StromDAONode = new require("./StromDAONode.js");
var node = new StromDAONode.Node({});
// Hole einen GWALink und schreibe einen Messwert
node.gwalink('0xBA2ef7bF8f21218c85c3399025E0d6D63632dc03').then(
function(gwalink) {
var reader_in = gwalink.reader_in;
var reader_out = gwalink.reader_out;
var myReading=new Date().getTime();
pragma solidity ^0.4.10;
/**
* StromDAO Business Objects
* ====================================================================
* Upper level business objects required for power delivery on a public
* energy distribution system. Defines PowerDelivery as digital asset
* used for transaction data and entities (roles) for master data.
*
* @author Thorsten Zoerner <thorsten.zoerner(at)stromdao.de)
**/
pnputil /enum-drivers > ./driveroutput.txt
Get-Content .\driveroutput.txt | Select-String -Pattern "Published Name" | %{$_.Line.Split(" ")} | Select-String -Pattern ".inf" | Where { $_ } | Set-Content .\oems.txt
foreach($line in Get-Content .\oems.txt) {
pnputil.exe /delete-driver $line
}