Skip to content

Instantly share code, notes, and snippets.

View lsmolic's full-sized avatar

Lucas Smolic lsmolic

View GitHub Profile
lsmolic /
Last active September 24, 2020 00:18
Machine Setup - Lemonlight
# run the install script
/usr/bin/ruby -e "$(curl -fsSL"
# update brew
brew update
# run the health check
brew doctor
lsmolic / safari-console.txt
Created July 10, 2019 19:52
Console at time of error on DuoLingo Create Event
View safari-console.txt
[Error] Cross-origin redirection to denied by Cross-Origin Resource Sharing policy: Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true.
[Error] Failed to load resource: Cross-origin redirection to denied by Cross-Origin Resource Sharing policy: Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true. (callback, line 0)
[Error] Fetch API cannot load due to access control checks.
[Error] Unhandled (in rea
View gist:9697954
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_student_rewards_on_student_id_and_reward_type"
DETAIL: Key (student_id, reward_type)=(2, silver) already exists.
: INSERT INTO "student_rewards" ("created_at", "reward_type", "student_exam_id", "student_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"
/Users/lsmolic/Repos/concept_yard/lantern-portal/app/models/concerns/exam_utility.rb:85:in `set_reward'
/Users/lsmolic/Repos/concept_yard/lantern-portal/app/models/concerns/exam_utility.rb:74:in `reward!'
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:99:in `block in create_student_exams'
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:77:in `times'
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:77:in `each'
/Users/lsmolic/Repos/concept_yard/lantern-portal/lib/tasks/fake_seed.rake:77:in `create_student_exams'
lsmolic / RestartNotSupportedException
Created February 12, 2014 19:09
View RestartNotSupportedException
javax.servlet.ServletException: hudson.lifecycle.RestartNotSupportedException: Failed to obtain the command line arguments of the process
at org.kohsuke.stapler.Stapler.tryInvoke(
at org.kohsuke.stapler.Stapler.invoke(
at org.kohsuke.stapler.Stapler.invoke(
at org.kohsuke.stapler.Stapler.service(
at javax.servlet.http.HttpServlet.service(
at winstone.ServletConfiguration.execute(
at winstone.RequestDispatcher.forward(
at winstone.RequestDispatcher.doFilter(
at hudson.util.PluginServletFilter$1.doFilter(
View gist:8788506
"exam" : {
"exam_id" : 1,
"student_id" : "87sn8s9d-ns97-8dbf-987s-334b98ds8"
"exam_words" : [
"word_id" : 24,
"score" : false
View gist:8660722
ruby -e "$(curl -fsSL"
View gist:7669646
NSDictionary *videoCleanApertureSettings = [NSDictionary dictionaryWithObjectsAndKeys:
@480, AVVideoCleanApertureWidthKey,
@480, AVVideoCleanApertureHeightKey,
@0, AVVideoCleanApertureHorizontalOffsetKey,
@0, AVVideoCleanApertureVerticalOffsetKey,
NSDictionary *videoAspectRatioSettings = [NSDictionary dictionaryWithObjectsAndKeys:
View gist:7669633
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:[self.project.composition copy] presetName:AVAssetExportPresetPassthrough];
NSURL* outputURL = [self createTempAssetFileURL:@"export"];
exportSession.outputURL = outputURL;
// exportSession.outputFileType=AVFileTypeQuickTimeMovie;
[exportSession exportAsynchronouslyWithCompletionHandler:^{
switch (exportSession.status) {
case AVAssetExportSessionStatusFailed:{
View gist:7490764
f0ster left the chat room. (Ping timeout: 240 seconds)
[10:37am] JSeligstein: remear: how would I know which one to use without also storing my token?
[10:37am] ras__: skylar: it'll have all the same cards and bank accounts attached on Customer that it does on Account
[10:37am] remear: JSeligstein: if you did something like customer.debit it would default to the most recently added
[10:38am] skylar: ras__ so Balanced::Account.find(uri).customer_uri ?
[10:39am] remear: to debit a specific one just pass the URI for it as source_uri. how you determine which one you want to debit is up to you. some people allow only one card at a time and so store the URI for it. others allow multiple cards to pick from
[10:39am] remear: skylar: yes
[10:39am] skylar: thanks! that's helpful
[10:39am] JSeligstein: remear: okay, i'll just store the uri for the specific card then
[10:39am] JSeligstein: remear: thanks
View gist:7489199
awsmsce:Hey everyone, quick question (hopefully) regarding URIs. wondering where there is a different uri for the same card when you refer to it from active_card and what the tokenizer returns
[2:48pm]jacobolus:hi awsmsce
[2:48pm]jacobolus:awsmsce: can you elaborate a bit?
[2:49pm]jacobolus:what's the "tokenizer"?
[2:49pm]awsmsce:when you tokenize a code, the api returns a URI for a card.. without a customer associated:
[2:50pm]awsmsce:however this differs from the URI that is returned when looking up a customer's active card
[2:50pm]awsmsce:but shouldn't the URI always be the same?
[2:50pm]awsmsce:the ID doesn't change
[2:50pm]jacobolus:if you tokenize a new card, then that card's URI is going to differ from a customer's existing card...?