Skip to content

Instantly share code, notes, and snippets.

View sverrirs's full-sized avatar
🌟
Be the change you wish to see in the world

Sverrir Sigmundarson sverrirs

🌟
Be the change you wish to see in the world
View GitHub Profile
@wmanth
wmanth / subtitle.sh
Last active August 12, 2022 00:30
Using MP4Box to add subtitles in SRT format to MP4 files that will be supported by AppleTV
# Add English language subtitle to MP4 file
MP4Box -add <Subtitle>.srt:hdlr=sbtl:lang=eng <MovieWithoutSubtitle>.mp4 -out <MovieWithSubtitle>.mp4
# Add English language subtitle with 1sec time delay to MP4 file
MP4Box -add <Subtitle>.srt:hdlr=sbtl:lang=eng:delay=1000 <MovieWithoutSubtitle>.mp4 -out <MovieWithSubtitle>.mp4
@sud007
sud007 / MyContextWrapper.java
Last active December 23, 2022 07:46
A simple gist to demonstrate How to change the App Language in Android.
public class MyContextWrapper extends ContextWrapper {
public MyContextWrapper(Context base) {
super(base);
}
@SuppressWarnings("deprecation")
public static ContextWrapper wrap(Context context, String language) {
Configuration config = context.getResources().getConfiguration();
Locale sysLocale = null;
@sverrirs
sverrirs / Google Blogger Social Meta Tags.html
Last active April 28, 2020 05:26
Because it is notoriously difficult, here is how you integrate social media tags for Facebook, Twitter, Google+ and Pinterest into Google Blogger template. Tested and validated by myself on blogger.com in August 2015. This is based on https://gist.github.com/MilanAryal/92997b311580c6e96dd0 but with important fixes and different integration strat…
<!-- add the following code in the head and body tags -->
<head prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#'>
<body itemscope='itemscope' itemtype='http://schema.org/Blog' prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#'>
<!--
I've found easiest to simply include the rest of the tags in the body of the webpage.
The browser will automatically interpret the should-be header tags correctly.
The only problem, and unavoidable when using a blogger template is that the Pintrest markup
will not currently work with their Rich Pin validation tool.
@flarb
flarb / VRInputModule.cs
Created August 20, 2014 22:27
Lets you use a VR world space cursor with World Space Canvases in Unity3D 4.6. Add this to the EventSystem object. Put some box colliders on your buttons in the World Space Canvas. Then, do a trace to see if you're looking at a menu object--if the trace hits one of those buttons, pass it to SetTargetObject. See ralphbarbagallo.com for a longer e…
using UnityEngine;
using UnityEngine.EventSystems;
//by Ralph Barbagallo
//www.flarb.com
//www.ralphbarbagallo.com
//@flarb
public class VRInputModule : BaseInputModule {
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………