Skip to content

Instantly share code, notes, and snippets.

@pama
pama / app.js
Last active March 16, 2022 12:17
Show data in a table using Express.JS
const express = require('express')
const app = express()
app.set('view engine', 'pug');
app.set('views','./views');
app.get('/', function (req, res) {
var users = [];
var mysql = require('mysql')
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=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')