Skip to content

Instantly share code, notes, and snippets.

View nuc's full-sized avatar
🍱
Always Hungry

Georgios Giannoutsos Barkas nuc

🍱
Always Hungry
View GitHub Profile
@nuc
nuc / lg.txt
Last active January 17, 2024 20:51
0.0.0.0. de.ad.lgsmartad.com
0.0.0.0. de.info.lgsmartad.com
0.0.0.0. de.lgrecommends.lgappstv.com
0.0.0.0. de.lgtvsdp.com
0.0.0.0. de.rdx2.lgtvsdp.com
0.0.0.0. de.tvsdp.lgeapi.com
0.0.0.0. eic-gfts.lge.com
0.0.0.0. eic-ngfts.lge.com
0.0.0.0. eic-ocp.lgtviot.com
0.0.0.0. eic.lgtviot.com
@nuc
nuc / attach-cube.sh
Created March 8, 2023 14:04
Attach .cube to movie file, using YouTube's hdr_metadata tool
#!/bin/bash
# Check if both parameters have been provided
if [ $# -ne 2 ]; then
echo "Usage: $0 <video_file> <cube_file>"
exit 1
fi
# Check if mkvmerge is available in PATH
if ! command -v mkvmerge &> /dev/null; then
@nuc
nuc / .gvimrc
Last active October 17, 2019 10:27
vimrc & gvimrc
set macmeta
" MacVim GUI mode
if has("gui_macvim")
" Dark
" set macligatures
set guifont=Operator\ Mono\ Light:h14
" set guifont=Droid\ Sans\ Mono:h12
" Light
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@nuc
nuc / .gvimrc
Last active May 14, 2019 09:44
vimrc
set macmeta
" MacVim GUI mode
if has("gui_macvim")
" Dark
set guifont=Operator\ Mono\ Light:h14
" set guifont=Droid\ Sans\ Mono:h12
" Light
" set guifont=Source\ Code\ Pro:h12
<!--
Browser support: partial
Success rate: 30%-90% depending on browser
Can prefetch HTML: yes
-->
<link rel="prefetch" href="index.html" />
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@nuc
nuc / non-expiring-fb-page-tokens.md
Last active December 20, 2016 13:51
How to generate Non-Expiring Facebook Page tokens

Non-Expiring Facebook Page tokens

class DeepStruct < OpenStruct
def initialize(hash=nil)
@table = {}
@hash_table = {}
if hash
hash.each do |k,v|
@table[k.to_sym] = (v.is_a?(Hash) ? self.class.new(v) : v)
@hash_table[k.to_sym] = v
@nuc
nuc / gist:fc28090296e0d95108ab19b46f870935
Created October 19, 2016 11:02 — forked from afeld/gist:1254889
YouTube video ID regex
# Parses YouTube URLs directly or from iframe code. Handles:
# * Address bar on YouTube url (ex: http://www.youtube.com/watch?v=ZFqlHhCNBOI)
# * Direct http://youtu.be/ url (ex: http://youtu.be/ZFqlHhCNBOI)
# * Full iframe embed code (ex: <iframe src="http://www.youtube.com/embed/ZFqlHhCNBOI">)
# * Old <object> tag embed code (ex: <object><param name="movie" value="http://www.youtube.com/v/ZFqlHhCNBOI">...)
/(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/
$5 #=> the video ID
# test it on Rubular: http://rubular.com/r/eaJeSMkJvo