-
name of the current banch and nothing else (for automation)
git rev-parse --abbrev-ref HEAD
-
all commits that your branch have that are not yet in master
git log master..<HERE_COMES_YOUR_BRANCH_NAME>
*.doc diff=astextplain | |
*.DOC diff=astextplain | |
*.docx diff=astextplain | |
*.DOCX diff=astextplain | |
*.dot diff=astextplain | |
*.DOT diff=astextplain | |
*.pdf diff=astextplain | |
*.PDF diff=astextplain | |
*.rtf diff=astextplain | |
*.RTF diff=astextplain |
[core] | |
editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin | |
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
dc = diff --cached | |
lg = log -p |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: hello-pod | |
spec: | |
containers: | |
- name: hello-ctr | |
image: nigelpoulton/pluralsight-docker-ci:latest | |
ports: | |
- containerPort: 8080 |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: hello-rc | |
spec: | |
replicas: 10 | |
selector: | |
app: hello-world | |
template: | |
metadata: |
In modern Java (after Java 8), we use the pacakage java.time.*
to represent DataTime. This is much better than the java.util
classes. For interoperability, we have methods in the java.util.*
package, that can convert from the older java.util.Date
to the newer types.
An instantaneous point on the time-line (with a precision of nano seconds). It models a single instantaneous point on the time-line. This might be used to record event time-stamps in the application. The epoch-seconds are measured from the standard Java epoch of 1970-01-01T00:00:00Z where instants after the epoch have positive values, and earlier instants have negative values.
This models a quantity or amount of time in terms of seconds and nanoseconds. It can be accessed using other duration-based units, such as minutes and hours. In addition, the DAYS unit can be used and is treated as exactly equal to 24 hours, thus ignoring daylight savings effects. Durations can also be negative.
// Creating a promise | |
let promise = new Promise ( | |
(resolve, reject) => { | |
// Some function that takes time - in this case, retuen afer 1 sec | |
setTimeout( () => { | |
if ( Math.random() > .5) { | |
resolve('😀'); | |
} else { | |
reject('😡'); | |
} |
// Uses the eventsource-parser library to parse the stream from OpenAI's chat completion API | |
// Make sure to set the OPENAI_API_KEY environment variable to your OpenAI API key | |
import {createParser} from 'eventsource-parser' | |
function generatePrompt(prompt) { | |
return [ | |
{"role": "system", "content": "The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly."}, | |
{"role": "user", "content": "Hello, who are you?"}, | |
{"role": "system", "content": `I am an AI created by OpenAI. How can I help you today?`}, |