Skip to content

Instantly share code, notes, and snippets.

View gingerhot's full-sized avatar
🎯
Focusing

B1nj0y gingerhot

🎯
Focusing
View GitHub Profile
@MazeW
MazeW / nanodisplaytest.md
Last active October 17, 2024 19:08
Connecting an IPS TFT display (ST7789) to an arduino nano and testing image output.

Guide on connecting a ST7789 display to an Arduino Nano.

I recently decided to order an arduino nano and a tft display from AliExpress. When I looked up online it took me some time to find a clear guide how to connect the display to the arduino, either the display had different pins or it was a slightly different model, but with some trial and error, I managed to get it to work.

What you'll need for this:

  • 1x Arduino Nano
  • 1x AdaFruit 1.3" 240x240 ST7789 display
  • 6x jumper wires or whatever else you can use to connect

Connecting display to the arduino

@ruanbekker
ruanbekker / docker-nfs-volumes.md
Created December 10, 2017 10:43
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
  mysql-test-1
@janlelis
janlelis / emoji.md
Last active May 24, 2024 17:01
List of 11.0 Emoji (compiled from emoji-test.txt)

Please note: See character.construction/emoji-categories for more up-to-date listings.

Emoji 11.0

Smileys & People

face-positive

😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 🥰 😗 😙 😚 ☺️ 🙂 🤗 🤩

@subfuzion
subfuzion / curl.md
Last active November 11, 2024 03:27
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@troyk
troyk / db.go
Created November 12, 2015 23:17
golang sql query abstraction
package db
import (
"database/sql"
"log"
"strings"
"sync"
_ "github.com/lib/pq" // required for database/sql
"golang.org/x/net/context"
@ramv
ramv / MovieLensALS.java
Last active February 1, 2016 07:33
Java Implementation of ALS Recommender for Movie Lens Data
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaDoubleRDD;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.api.java.function.DoubleFlatMapFunction;
import org.apache.spark.api.java.function.Function;
import org.apache.spark.ml.recommendation.ALS;
import org.apache.spark.ml.recommendation.ALSModel;
import org.apache.spark.mllib.recommendation.Rating;
import org.apache.spark.sql.DataFrame;
@phlegx
phlegx / Rails 4 - how to give alias names to includes() and joins() in active record quering
Last active February 12, 2024 19:12
Rails 4 - how to give alias names to includes() and joins() in active record quering
See question on stack overflow: http://stackoverflow.com/questions/28595636/rails-4-how-to-give-alias-names-to-includes-and-joins-in-active-record-que
- Model Student and model Teacher are both STI models with super class model User
- Model Story is a STI model with super class model Task
- includes() and joins(), both fails
Rails alias naming convention (includes() and joins())
- One model as parameter
- is base model (includes(:users))
input {
udp {
port => 3334
codec => json_lines
type => "system_logs"
}
udp {
port => 3333
codec => json_lines
type => "business_logs"
@willprice
willprice / .travis.yml
Last active June 15, 2024 04:29
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@mathematicalcoffee
mathematicalcoffee / chapter.hs
Last active February 23, 2021 07:10
Pandoc extension to insert the metadata of a file as headings of levels 1, 2 and 3. This is so that if you have (say) each chapter of a thesis in its own file with its own title block, you can still compile the lot together to the one final thesis. See the file for more details.
#!/usr/bin/env runhaskell
-- Filter that adds the metadata block as h1, h2, h3 (title, author, date).
--
-- Usage::
-- chmod +x ./chapter.hs
--
-- # (where each chapter is in its own md file and I want to compile them
-- # into one document preserving the title/author/date for each chapter):
--
-- for f in Chapter*.md; do \