Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
This playbook has been removed as it is now very outdated. |
# http://docs.rubygems.org/read/chapter/11 | |
--- | |
gem: --no-ri --no-rdoc | |
benchmark: false | |
verbose: true | |
update_sources: true | |
sources: | |
- http://gems.rubyforge.org/ | |
- http://rubygems.org/ | |
backtrace: true |
=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') |
#!/bin/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
# The ChatGptService class provides an easy way to integrate with the OpenAI ChatGPT API. | |
# It allows you to send and receive messages in a conversation thread, and reset the thread | |
# if necessary. | |
# | |
# Example usage: | |
# chat_gpt_service = ChatGptService.new(BEARER_TOKEN) | |
# response = chat_gpt_service.chat("Hello, how are you?") | |
# puts response | |
# # => {"message"=> | |
# # {"id"=>"8e78691a-1fde-4bd5-ad68-46b23ea65d8f", |
# An answer to https://tour.golang.org/moretypes/26 | |
# This is a bit more readable than other examples that I found online | |
# Implement a fibonacci function that returns a function (a closure) that returns successive fibonacci numbers (0, 1, 1, 2, 3, 5, ...). | |
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. |