Skip to content

Instantly share code, notes, and snippets.

View crgc's full-sized avatar
🧙‍♂️
Moving memory pointers for fun and profit

Carlos González crgc

🧙‍♂️
Moving memory pointers for fun and profit
  • Santo Domingo
  • 03:04 (UTC -04:00)
View GitHub Profile
@marnanel
marnanel / gist:87fee222990df53d23a9999d90a4eae2
Created June 27, 2018 18:39
Sub Station Alpha (libass) subtitle format spec
Sub Station Alpha v4.00+ Script Format
1. 1. General information
2. 2. The [sections] of a Sub Station Alpha script
3. 3. The line types in a Sub Station Alpha script
4. 4. Header lines, [Script Info] section
5. 5. Style lines, [v4 Styles] section
6. 6. Dialogue event lines, [Events] section
@msyvr
msyvr / rails 5 asset pipeline management: fonts
Last active August 15, 2023 22:53
Getting custom fonts to work for Rails 5 app deployed to Heroku.
I deployed to Heroku and custom fonts didn't work. Details of my starting point below.
Fixed in 2 steps:
1. In application.rb file, in class Application < Rails::Application, added:
config.assets.paths << Rails.root.join("app","assets","fonts")
2. In application.scss file, in @font-face, changed src: url('...') to font-url('...'); e.g.:
src: font-url('Aileron/Aileron-Regular.otf') format('opentype');
Redeployed to Heroku and custom fonts worked.
---
Starting point details (this all worked for a local deploy, but not when deployed on Heroku):
@madoke
madoke / XSSRequestWrapper.java
Created April 9, 2012 22:23 — forked from ulinkwo/XSSRequestWrapper.java
Stronger Anti Cross-Site Scripting (XSS) Filter for Java Web Apps
package pt.impresa.iweb.filters.request;
import java.io.IOException;
import java.text.Normalizer;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
@vlucas
vlucas / gist:1802688
Created February 11, 2012 17:22
Mac OS X Architecture Flags
# x386 Architecture
export CFLAGS="-arch i386 $CFLAGS"
export CCFLAGS="-arch i386 $CCFLAGS"
export CXXFLAGS="-arch i386 $CXXFLAGS"
export LDFLAGS="-arch i386 $LDFLAGS"
# x64 Architecture
export CFLAGS="-arch x86_64 $CFLAGS"
export CCFLAGS="-arch x86_64 $CCFLAGS"
export CXXFLAGS="-arch x86_64 $CXXFLAGS"