Provider | RAM | Cores | Storage | Transfer |
---|---|---|---|---|
LightSail | 512MB | 1 | 20GB SSD | 1TB |
DO | 512MB | 1 | 20GB SSD | 1TB |
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
public class SimpleEchoServer implements Runnable { | |
private int port; | |
private LinkedList<Socket> openClients = new LinkedList<Socket>(); | |
private boolean cleaningUp = false; | |
public SimpleEchoServer(int port) { | |
this.port = port; | |
} | |
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
package com.hussain.pf | |
import groovy.xml.MarkupBuilder | |
import org.apache.commons.lang.StringEscapeUtils | |
import org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib | |
class CustomValidationTagLib extends ValidationTagLib { | |
/** |
Wow... Kiyotaka Oku's fork of this shows how to do it in one line :-)
The other day, I saw Harold Cooper's One-line tree in Python via autovivication, and wondered if the same thing was possible in Groovy.
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
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
new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC")) |
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
// Credit David Walsh (https://davidwalsh.name/javascript-debounce-function) | |
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce(func, wait, immediate) { | |
var timeout; |
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
/* Shadow 0dp */ | |
box-shadow: none; | |
/* Shadow 1dp */ | |
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20); | |
/* Shadow 2dp */ | |
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20); | |
/* Shadow 3dp */ |
Create a new repository, or reuse an existing one.
Generate a new SSH key:
ssh-keygen -t rsa -C "your_email@example.com"
Copy the contents of the file ~/.ssh/id_rsa.pub
to your SSH keys in your GitHub account settings.
Test SSH key:
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 mapDiff(Map m1, Map m2, String path="") { m1.each{k,v-> | |
if(m2[k] != m1[k]) { | |
if(m1[k] in Map) { | |
mapDiff(m1[k] as Map, m2[k] as Map, "${path}${k}.") | |
} | |
else { | |
println("${path}${k} ->"); | |
println("\texpected: ${m1[k]}") | |
println("\tactual: ${m2[k]}") | |
if (m1[k] in List) { |
OlderNewer