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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
<div class="rounded-md bg-green-50 p-4" role="alert"> | |
<p class="text-sm font-medium text-green-800"> | |
<%= flash[:notice] %> | |
</p> | |
</div> | |
<div class="rounded-md bg-red-50 p-4 mt-4" role="alert"> | |
<p class="ml-3 text-sm font-medium text-red-800"> | |
<%= flash[:alert] %> | |
</p> | |
</div> |
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 touch2() { | |
mkdir -p "$(dirname "$1")" && touch "$1"; | |
} |
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 React, { Component } from "react"; | |
import { Route, Switch, Redirect } from "react-router-dom"; | |
import "./css-build.css"; | |
import Navbar from "./components/Navbar"; | |
import Home from "./views/Home"; | |
import Search from "./views/Search"; | |
import Watchlist from "./views/Watchlist"; | |
import SingleMovie from "./views/SingleMovie"; | |
import firebase from "firebase"; | |
import { firebaseApp } from "./firebase"; |
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 firstUniqChar(self, s): | |
wordlist = list(s) | |
# iterate over the string | |
for idx, letter in enumerate(wordlist): | |
current_letter = wordlist.pop(idx) | |
if current_letter in wordlist: | |
wordlist.insert(idx, current_letter) | |
else: | |
return idx |
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
/* Include this somewhere in your main.css for the background iamge */ | |
body { | |
background-image: url(images/nza_background.jpg); | |
} | |
.pad-sidebar { | |
padding-left: 30px; | |
} |
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
Show hidden characters
{ | |
"presets": [ | |
["@babel/env",{"targets": {"node": "current"}}], | |
], | |
"plugins": [ | |
"@babel/plugin-proposal-object-rest-spread", | |
"@babel/plugin-proposal-class-properties" | |
] | |
} | |