Skip to content

Instantly share code, notes, and snippets.

@cnaize
cnaize / trial-reset-intellij-golang-2018-macos.sh
Last active Nov 13, 2019 — forked from jahe/trial-reset-intellij-macos.sh
Trial reset script for IntelliJ IDEA on macOS
View trial-reset-intellij-golang-2018-macos.sh
#!/bin/sh
rm ~/Library/Preferences/GoLand2018*/eval/*evaluation.key
rm ~/Library/Preferences/GoLand2018*/options/options.xml
# remove all intellij keys from
# ~/Library/Preferences/com.apple.java.util.prefs.plist
# reboot
@mskutin
mskutin / Jenkinsfile
Created Dec 13, 2017 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
View Jenkinsfile
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
@PurpleBooth
PurpleBooth / README-Template.md
Last active Nov 13, 2019
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@subfuzion
subfuzion / curl.md
Last active Nov 13, 2019
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@squarism
squarism / iterm2.md
Last active Nov 13, 2019
iterm2 cheatsheet
View iterm2.md

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
View learning_scala.org
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 — forked from jboner/latency.txt
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs
@tommydunn
tommydunn / index.html
Created Feb 3, 2018
Slick Slider with auto play YouTube, Vimeo and HTML5 video
View index.html
<header>
<h1>SITE TITLE</h1>
<nav>
<ul>
<li><a href="#">HOME</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">SERVICES</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</nav>
@DhavalDalal
DhavalDalal / Attention.md
Last active Nov 13, 2019
Loyalty Points - C#
View Attention.md

Loyalty Points (C#)

  • Create a C# Library Project - you can name it LoyaltyPoints.
  • Copy PointsCalculatorTest.cs under project PrivilegeServiceSpecs. Add reference to NUnit in this project.
  • Copy Tier.cs, PrivilegeService.cs, PointsCalculator.cs, CustomerRepository.cs and Customer.cs under project PrivilegeService.
  • Run the tests to get a green bar.

An airline has following rules for calculating bonus amount for loyalty points for a customer based on which tier they are in:

  • If a customer is in Platinum tier, add 50% more points above regular points.
You can’t perform that action at this time.