Skip to content

Instantly share code, notes, and snippets.

Avatar

Jose Luis Blanco-Claraco jlblancoc

View GitHub Profile
@MBing
MBing / install_wlan_dongle.sh
Last active June 4, 2023 07:54
install TP-Link-WN725N Nano USB Wifi on Raspberry Pi with Kernel 5.10+
View install_wlan_dongle.sh
# 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
@ousttrue
ousttrue / CMakeLists.txt
Created June 3, 2019 13:39
emscripten glfw3 or webgl sample
View CMakeLists.txt
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
@mortennobel
mortennobel / SingleFileOpenGLTex.cpp
Last active May 1, 2023 09:43
Single file OpenGL 3.3 / WebGL (using Emscripten) example with texture (SDL2 / SDL_Image 2)
View SingleFileOpenGLTex.cpp
//
// 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
//
@donaldmunro
donaldmunro / gist:38841d72c65a1c32f2bf83a4a00a2c9a
Created March 5, 2017 13:26
Display/print a GLM mat or vec
View gist:38841d72c65a1c32f2bf83a4a00a2c9a
#include <glm/gtx/string_cast.hpp>
..
..
glm::mat4 mat;
..
..
std::cout << glm::to_string(mat) << std::endl;
@gschora
gschora / odys_seal_dvd-player.txt
Created July 25, 2015 10:50
odys seal portable dvd player sd card reencode videos tutorial
View odys_seal_dvd-player.txt
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
@domenic
domenic / 0-github-actions.md
Last active May 3, 2023 08:11
Auto-deploying built products to gh-pages with Travis
View 0-github-actions.md

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.
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 24, 2023 15:35
how to delete a git tag locally and remote
View git-tag-delete-local-and-remote.sh
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@socantre
socantre / gist:3472964
Created August 26, 2012 01:26
bit_cast
View gist:3472964
#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.
//
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
View fix_github_https_repo.sh
#/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