Skip to content

Instantly share code, notes, and snippets.

View lsmolic's full-sized avatar

Lucas Smolic lsmolic

View GitHub Profile
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
{
"exam" : {
"exam_id" : 1,
"student_id" : "87sn8s9d-ns97-8dbf-987s-334b98ds8"
"exam_words" : [
{
"word_id" : 24,
"score" : false
},
{
@lsmolic
lsmolic / RestartNotSupportedException
Created February 12, 2014 19:09
RestartNotSupportedException
javax.servlet.ServletException: hudson.lifecycle.RestartNotSupportedException: Failed to obtain the command line arguments of the process
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:587)
at org.kohsuke.stapler.Stapler.service(Stapler.java:218)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
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
lsmolic / safari-console.txt
Created July 10, 2019 19:52
Console at time of error on DuoLingo Create Event
[Error] Cross-origin redirection to https://events.duolingo.com/gql 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 https://events.duolingo.com/gql 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 https://events.duolingo.com/accounts/ssoclient/callback/?sso_token=b7YmP7L9171r5DtOt2Vk3iwzPqJdkfwQ5dwUww4kPtnJZeMwAIvUPIwmExxO3jGVwG_zHvp7vLN8ynEp0FaZSuPCwEOCz-_oK17C-Pl3zadpK0VrIp-oYS4Lc2hhqUGnqdBaH0YZ8TnVHAVXk6NedA2hTt7Zz1_4JSiSZuAKMIdp6pLybASJlFCqrRYjxccpp79m0fJF53eLK-h52xWOSOyOMNQRShKBUMxxu-uaToFJXVhw4Okxemsene_29epxU235zdfesZN3iAwwHbAo_pLBtfrGS2tYkhvEtMq9U-nV6b6qRLKdULPw9Jf8DPAirdc9hYX2C1xVPiwtY23sn21wsdZn8UGVp6WqCFkwqyAwgvzG69keOkRjBy-oUGKWf6-Big0HhNXH0DtIBD7SRQ%3D%3D&sso_auth_status=OK due to access control checks.
[Error] Unhandled (in rea
@lsmolic
lsmolic / 01.install-brew.sh
Last active September 24, 2020 00:18
Machine Setup - Lemonlight
# DOCS: https://brew.sh/
# run the install script
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# update brew
brew update
# run the health check
brew doctor