This tutorial moved to the new Career Playbook!
This file contains hidden or 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
# Sidekiq interaction and startup script | |
commands: | |
create_post_dir: | |
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
owner: root | |
group: root |
Add this line to your Gemfile
and run bundle install
# Gemfile
gem "redis"
Create a new initializer to have a global $redis
variable at hand:
This file contains hidden or 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
movies: | |
- title: "Superman" | |
year: 1978 | |
director_slug: donner | |
synopsis: | | |
An alien orphan is sent from his dying planet to Earth, | |
where he grows up to become his adoptive home's first and greatest superhero. | |
- title: "Batman v Superman: Dawn of Justice" | |
year: 2016 | |
director_slug: snyder |
This file contains hidden or 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 requests | |
isbn = input("ISBN?") | |
key = f"ISBN:{isbn}" | |
# https://openlibrary.org/api/books?bibkeys=ISBN:0451526538&format=json&jscmd=data | |
url = "https://openlibrary.org/api/books" | |
params = { | |
"bibkeys": key, |
This file contains hidden or 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
#root > div { | |
display: flex; | |
height: 100vh; | |
} | |
.left-scene { | |
flex: 0 0 60%; | |
position: sticky; | |
display: flex; | |
flex-direction: column; |
This file contains hidden or 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
// Webpack 5 default configuration | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const path = require('path'); | |
module.exports = { | |
mode: 'development', | |
entry: './src/index.js', | |
output: { | |
path: path.resolve(__dirname, './dist'), |
This file contains hidden or 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
[ | |
{ "keys": ["tab"], "command": "expand_abbreviation_by_tab", "context": | |
[ | |
{ "operand": "source.js", "operator": "equal", "match_all": true, "key": "selector" }, | |
{ "match_all": true, "key": "selection_empty" }, | |
{ "operator": "equal", "operand": false, "match_all": true, "key": "has_next_field" }, | |
{ "operand": false, "operator": "equal", "match_all": true, "key": "auto_complete_visible" }, | |
{ "match_all": true, "key": "is_abbreviation" } | |
] | |
} |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"> | |
<title>Hello, world!</title> | |
</head> | |
<body> |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[import pdb; pdb.set_trace()]]></content> | |
<tabTrigger>pdb</tabTrigger> | |
<scope>source.python</scope> | |
<description>import pdb</description> | |
</snippet> | |
<!-- USAGE --> | |
<!-- 1. Go to Tools -> New Snippet --> |
NewerOlder