This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in *.srt; do | |
t=$(echo $f | sed 's/\.mov.srt$//' | tr '[:upper:]' '[:lower:]'); | |
echo converting $f to $t.vtt | |
srt-to-vtt $f > $t.vtt | |
sed -i -e 's/<[^>]*>//g' $t.vtt | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import glob | |
def add_line(filename): | |
out = [] | |
with open(filename) as f: | |
for l in f: | |
if '-->' in l: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Config is a custom oauth2 config that is used to store the token | |
// in the datastore | |
type Config struct { | |
*oauth2.Config | |
} | |
// StoreToken is called when exchanging the token and saves the token | |
// in the datastore | |
func (c *Config) StoreToken(ctx context.Context, token *oauth2.Token) error { | |
log.Infof(ctx, "storing the token") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws iam upload-server-certificate \ | |
--server-certificate-name MixTheCitySha2 \ | |
--certificate-body file://mixthecity.com.crt \ | |
--private-key file://mixthecity.com.plain.key \ | |
--certificate-chain file://sub.class1.server.sha2.ca.pem \ | |
--path /cloudfront/mix-the-city/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def merge(range1, range2): | |
""" | |
returns a merged range if range can be merged, | |
otherwise returns False. | |
we suppose that range1[0] <= range2[0] | |
""" | |
if range1 == range2: | |
return range1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Base64; | |
import com.squareup.okhttp.Interceptor; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.Response; | |
import java.io.IOException; | |
public class BasicAuthInterceptor implements Interceptor { | |
String username; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
color: #424242; | |
font: 21px/32px "Courier New"; | |
} | |
h1 { | |
font-weight: normal; | |
font-family: Garamond; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load cms_tags sekizai_tags compressed static %} | |
{% if not request.is_ajax %}{% include "base_head.html" %}{% endif %} | |
<div class="main"> | |
{% block base_content %}{% endblock %} | |
</div> | |
{% if not request.is_ajax %}{% include "base_foot.html" %}{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.fn.autoFitInput = function (o) { | |
function getTestSubject(input, text) { | |
var testSubject = $('#input-tester'); | |
if (testSubject.length === 0){ | |
testSubject = $('<pre id="input-tester" />').appendTo('body').css({ | |
position: 'absolute', | |
top: -9999, | |
left: -9999, |