Skip to content

Instantly share code, notes, and snippets.

View SzieberthAdam's full-sized avatar
🏠
Working from home

SZIEBERTH Ádám SzieberthAdam

🏠
Working from home
View GitHub Profile
@raysan5
raysan5 / raylib_vs_sdl.md
Last active April 13, 2024 10:38
raylib vs SDL - A libraries comparison

raylib_vs_sdl

In the last years I've been asked multiple times about the comparison between raylib and SDL libraries. Unfortunately, my experience with SDL was quite limited so I couldn't provide a good comparison. In the last two years I've learned about SDL and used it to teach at University so I feel that now I can provide a good comparison between both.

Hope it helps future users to better understand this two libraries internals and functionality.

Table of Content

@JeffM2501
JeffM2501 / gist:6e4630a0e34c0c7dddf066f7192e342d
Created March 7, 2021 17:32
Raylib fullscreen toggle example
/*******************************************************************************************
*
* raylib [core] example - fullscreen toggle
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or
@dnmodder
dnmodder / fixcontroller.py
Last active March 10, 2024 14:25
This script should no longer be necessary thanks to the latest changes made to the master branch of the xpad [https://github.com/paroj/xpad] driver, please give it a try and report any regressions you find.
#!/usr/bin/env python3
import os
import sys
try:
import usb.core
import usb.util
except ImportError:
@plroebuck
plroebuck / svg2icns.bash
Last active January 23, 2024 07:03
Create ICNS file from SVG file (with ImageMagick)
#! /bin/bash
###
### svg2icns.bash
### Create ICNS file from SVG
###
### See also:
### <https://stackoverflow.com/questions/12306223/how-to-manually-create-icns-files-using-iconutil#39678276>
### <https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html>
###
@primaryobjects
primaryobjects / m3u8.md
Last active April 15, 2024 15:19
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@wavezhang
wavezhang / java_download.sh
Last active April 10, 2024 16:21
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@karlding
karlding / itunes-artist-photos.md
Created March 3, 2016 05:17
Grab iTunes image artwork from the DOM using the Open Graph meta tags

iTunes Artist Photos

The iTunes API doesn't provide a way to grab artist images, but the iTunes website uses Open Graph meta tags, which embeds a meta tag with a property attribute value set to og:image. As it turns out, this seems to be the same image used in the iTunes artwork.

The URL structure is similar to the artworkUrl values returned by the API, but what concerns us here is the part I've indicated at the end of the URL.

http://is3.mzstatic.com/image/thumb/Music7/v4/68/68/41/68684190-833b-bfb4-5018-e5a2e6f69eb0/source/1200x630bf.jpg
                                                                                                   └─ widthxheight
@renatolfc
renatolfc / android-client.ovpn
Created December 28, 2014 18:59
A sample OpenVPN client configuration file in the unified format
client
dev tun
remote example.com
resolv-retry infinite
nobind
persist-key
persist-tun
ca [inline]
cert [inline]
key [inline]
local vector = {}
vector.__index = vector
local function is_vector(t)
return getmetatable(t) == vector
end
function vector.new(x, y)
return setmetatable({ x = x or 0, y = y or 0 }, vector)
end
@kylekeesling
kylekeesling / paginator.html
Created October 31, 2013 12:35
Simple Jekyll Paginator Logic I didn't like the pagination logic provided in the Jekyll Docs (http://jekyllrb.com/docs/pagination/) since it repeated the HTML for displaying the button, so I came up w/ this. It stores the proper previous page path into a liquid variable then plops it into the HREF so you only have to code your button once
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
{% capture previous_page %}/{% endcapture %}
{% else %}
{% capture previous_page %}/page{{ paginator.previous_page }}{% endcapture %}
{% endif %}
<a href="{{ previous_page }}" class="previous">&larr; Newer Posts</a>
{% endif %}
{% if paginator.next_page %}