Skip to content

Instantly share code, notes, and snippets.

View andreagalle's full-sized avatar
💭
Whatever Works - Basta che funzioni

Andrea Gallegati andreagalle

💭
Whatever Works - Basta che funzioni
View GitHub Profile
@bgulla
bgulla / readme.md
Last active February 5, 2023 15:16
Bad instructions on setting up a Hyperion DIY ambilight system

WLED Hyperion Ambilight Notes

Disclaimer

Nothing about this is turnkey. It's a mess of protocols, firmware and apps, but if you're the right kind of nuts, keep reading.

Required hardware

  • Power Supply Amazon $22
  • WS2812B Addressable RGB LED Strips Amazon $30
  • NodeMCU 8266 Amazon $6
  • AndroidTV - There are alternatives that include using a HDMI grabber and decoding the signal on a Pi/server directly, but this works for a 0.1 alpha attempt. I used a NVidia ShieldTV
@danieljs777
danieljs777 / PasswordEncryption.java
Last active July 25, 2022 05:52
Encryting passwords with MD5 hash and salt in Java.
package PasswordEncryption;
/**
*
* @author daniel
*/
import java.io.Console;
import java.io.IOException;
import java.security.*;
import java.io.ByteArrayOutputStream;
@david-wm-sanders
david-wm-sanders / pipfreeze
Created September 4, 2017 01:20
Powershell Command to pip freeze properly
.\venv\Scripts\pip freeze | Out-File -Encoding UTF8 requirements.txt
---
layout: default
permalink: /
---
# Advanced JavaScript syllabus
***If you are a teacher or interested in the design of the course, see the [meta](https://github.com/advanced-js/syllabus/blob/master/meta.md) document.***
* **Course:** [INFO1-CE9766, NYU SCPS](http://scps.nyu.edu/content/scps/academics/course_detail.html?id=INFO1-CE9766)
@mrklein
mrklein / vtk-unstructured-grid-plot.py
Last active September 22, 2022 12:07
Read, cut and plot VTK file with python-vtk and matplotlib
%matplotlib inline
filename = 'vtk-plot_0.vtk'
import vtk
from numpy import zeros
import matplotlib.pyplot as plt
reader = vtk.vtkUnstructuredGridReader()
reader.SetFileName(filename)
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 25, 2024 09:23
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tdd
tdd / git-subtrees.md
Last active October 2, 2020 18:25
Subtrees investigations

Workbench

We extract our test repos from this small Zip file.

  • main is a "container" repository with its working copy,
  • plugin is a "shared" repository with its working copy,
  • remotes emulates remote bare repos for both, to better resemble regular usage.

The idea is to use plugin as a subtree of main in a vendor/plugins/demo path, and allow maintenance both ways:

@vlucas
vlucas / pre-push.sh
Created July 22, 2014 16:12
Prevent Pushes Directly to Master
#!/bin/bash
# @link https://gist.github.com/mattscilipoti/8424018
#
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
@nateware
nateware / make_favicon.sh
Last active April 8, 2024 05:48
Imagemagick to create favicon.ico with 16x16 and 32x32 sizes in it
# IE is still braindead so still use favicon.ico
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
convert output-16x16.ico output-32x32.ico favicon.ico
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32">
@hemmer
hemmer / Makefile
Last active January 31, 2020 18:24
Example of FFTW transforms with various indexing methods. See printDataFourier for examples.
program_NAME := fourier
CC = cc
program_C_SRCS := $(wildcard *.c) $(wildcard */*.c)
program_C_OBJS := ${program_C_SRCS:.c=.o}
program_OBJS := $(program_C_OBJS) $(program_CXX_OBJS)
program_INCLUDE_DIRS :=
program_LIBRARY_DIRS :=
program_LIBRARIES := pthread fftw3 m gsl gslcblas
program_FLAGS := -Wall -Wextra -g -std=c99 -Wshadow
#program_FLAGS := -Wall -Wextra -O3 -std=c99 -Wshadow