{"id":19154054,"url":"https://github.com/thinkswan/rails-resque-code-snippets","last_synced_at":"2025-07-28T09:07:49.446Z","repository":{"id":54086550,"uuid":"194240590","full_name":"thinkswan/rails-resque-code-snippets","owner":"thinkswan","description":"A Rails app that manages a library of code snippets and uses Resque workers to apply syntax highlighting.","archived":false,"fork":false,"pushed_at":"2021-03-09T15:24:18.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T21:26:00.832Z","etag":null,"topics":["resque","ruby","ruby-on-rails","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinkswan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-28T08:50:24.000Z","updated_at":"2019-06-28T18:06:43.000Z","dependencies_parsed_at":"2022-08-13T06:40:16.988Z","dependency_job_id":null,"html_url":"https://github.com/thinkswan/rails-resque-code-snippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thinkswan/rails-resque-code-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkswan%2Frails-resque-code-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkswan%2Frails-resque-code-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkswan%2Frails-resque-code-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkswan%2Frails-resque-code-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkswan","download_url":"https://codeload.github.com/thinkswan/rails-resque-code-snippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkswan%2Frails-resque-code-snippets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267489790,"owners_count":24095804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["resque","ruby","ruby-on-rails","tutorial"],"created_at":"2024-11-09T08:25:18.213Z","updated_at":"2025-07-28T09:07:49.260Z","avatar_url":"https://github.com/thinkswan.png","language":"Ruby","readme":"# rails-resque-code-snippets\n\nA Rails app that manages a library of code snippets and uses Resque workers to\napply syntax highlighting.\n\nBased on the tutorial found at http://railscasts.com/episodes/271-resque.\n\n## How to use\n\n#### Clone the repo\n\n```\ngit clone git@github.com:thinkswan/rails-resque-code-snippets.git\n```\n\n#### Install Redis\n\nIf you're using Homebrew:\n\n```\nbrew install redis\nredis-server /usr/local/etc/redis.conf\n```\n\nIf you prefer to install from source:\n\n* http://redis.io/download#installation\n\n#### Install gems and set database up\n\n```\ngem install foreman\nbundle install\nbin/rake db:setup\n```\n\n#### Start server and Resque workers\n\n```\nforeman start\n```\n\nThis will start a server at http://localhost:3000.\n\nTo monitor the Resque workers, open http://localhost:3000/resque in a separate\ntab.\n\n![Resque web admin](https://cloud.githubusercontent.com/assets/338259/8618992/2e30d4a4-273d-11e5-8530-cc107344870b.jpg)\n\n\n## How it works\n\nThe Rails app is a basic CRUD application that allows you to manage code\nsnippets. It is backed by an SQLite3 database.\n\nWhen you create or modify a snippet, a Resque worker (`SnippetHighlighter`) is\nenqueued. This worker sends the code snippet and specified language to a [public\nsyntax highlighting API](http://markup.su/highlighter/api) and saves the result\nwhen finished.\n\nNote that when you first create or modify a snippet, you will see the plain\ncode when the request completes. This is because the syntax highlighting job has\nnot been picked off the queue yet.\n\n![Code snippet (no syntax highlighting)](https://cloud.githubusercontent.com/assets/338259/8618993/2e320306-273d-11e5-983c-eccfa927d416.jpg)\n\nOnce a worker finishes the job, you can refresh the page to see the\nsyntax highlighted version of the snippet.\n\n![Code snippet (with syntax highlighting)](https://cloud.githubusercontent.com/assets/338259/8618994/2e346902-273d-11e5-9048-370ffc69909b.jpg)\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkswan%2Frails-resque-code-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkswan%2Frails-resque-code-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkswan%2Frails-resque-code-snippets/lists"}