Skip to content

Instantly share code, notes, and snippets.

View jlblancoc's full-sized avatar

Jose Luis Blanco-Claraco jlblancoc

View GitHub Profile
@socantre
socantre / gist:3472964
Created August 26, 2012 01:26
bit_cast
#include <cstring> // memcpy
#include <type_traits> // is_trivially_copyable
// http://src.chromium.org/viewvc/chrome/trunk/src/base/basictypes.h?view=markup
// bit_cast<Dest,Source> is a template function that implements the
// equivalent of "*reinterpret_cast<Dest*>(&source)". We need this in
// very low-level functions like the protobuf library and fast math
// support.
//
@gschora
gschora / odys_seal_dvd-player.txt
Created July 25, 2015 10:50
odys seal portable dvd player sd card reencode videos tutorial
Der Player ist zwar sehr wählerisch, was das Format angeht, aber es funktioniert.
Für alle Interessierten, hier die Anleitung:
1. Die Software XMedia Recode (kostenlos und virenfrei z.B. bei CHIP) auf dem PC installieren
2. DVD/BD ins Laufwerk legen (alternativ gehen auch Dateien von Platte – siehe Programmdoku)
3. Im oberen Bildabschnitt den längsten Titel auswählen (bei DVDs und BDs)
4. Reiter „Format“:
. Profil: Benutzerdefiniert
. Format: AVI
. Dateiendung: avi
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@donaldmunro
donaldmunro / gist:38841d72c65a1c32f2bf83a4a00a2c9a
Created March 5, 2017 13:26
Display/print a GLM mat or vec
#include <glm/gtx/string_cast.hpp>
..
..
glm::mat4 mat;
..
..
std::cout << glm::to_string(mat) << std::endl;
@jlblancoc
jlblancoc / Instructions.md
Last active December 23, 2023 12:35
Tasmota Rules for LC Technology WiFi Relay

Introduction

These commands are shown in the YouTube tutorial: xxx

Based on the official docs with the addition of the automatic sending of ready\r\n on boot, as required by the firmware of my boards (these ones).

Rules for all boards:

  • Open Module Configuration -> Set module to Generic (18). Click save.
  • Now, depending on the number of relays on your board, do the next 1, 2 or 4 changes:
@mortennobel
mortennobel / SingleFileOpenGLTex.cpp
Last active January 25, 2024 10:03
Single file OpenGL 3.3 / WebGL (using Emscripten) example with texture (SDL2 / SDL_Image 2)
//
// Compile for emscripten using
// emcc -Iinclude SingleFileOpenGLTex.cpp \
-O2 -std=c++14 -s TOTAL_MEMORY=33554432 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' --preload-file examples/data -s USE_SDL=2 -o html/SingleFileOpenGLTex.html
// where the following images must be located in a subfolder
// - examples/data/test.png
// - examples/data/cartman.png
// - examples/data/cube-negx.png
// - examples/data/cube-negz.png
//
@ousttrue
ousttrue / CMakeLists.txt
Created June 3, 2019 13:39
emscripten glfw3 or webgl sample
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
PROJECT(em_gl VERSION 0.1.0)
LINK_DIRECTORIES(
$ENV{VCPKG_ROOT}/installed/x64-windows/lib
)
FILE(GLOB SRC
*.cpp
*.h
@MBing
MBing / install_wlan_dongle.sh
Last active April 3, 2024 05:20
install TP-Link-WN725N Nano USB Wifi on Raspberry Pi with Kernel 5.10+
# DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW
# Brief note, after this the UI will not show the usb dongle,
# the wifi does work and I get an IP address, so all works,
# but I don't go into detail of making it show on the Raspbian UI.
# (for this purpose I don't care about the UI)
# For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into.
## STEP 1: Prepare machine and install packages needed
@domenic
domenic / 0-github-actions.md
Last active April 8, 2024 23:35
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@roachhd
roachhd / README.md
Last active April 10, 2024 10:26
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄