Skip to content

Instantly share code, notes, and snippets.

@dodyg
dodyg / gist:5616605
Last active Nov 21, 2022
Kotlin Programming Language Cheat Sheet Part 2
View gist:5616605

This is a quick guide to Kotlin programming language. The previous part of this guide is here

#Object Oriented

fun main(args : Array<String>) {
  class local (val x : Int)
  
  val y = local(10)
 println("${y.x}")
@kapkaev
kapkaev / gist:4619127
Created Jan 24, 2013
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. Resque
View gist:4619127
$ redis-cli
> config set stop-writes-on-bgsave-error no
@mmdemirbas
mmdemirbas / LogFile.udl.xml
Created Sep 13, 2012
Custom log file syntax highlighting for Notepad++
View LogFile.udl.xml
<NotepadPlus>
<UserLang name="LogFile" ext="log">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">[(0])0</Keywords>
<Keywords name="Folder+"></Keywords>
@kares
kares / FileGlob.groovy
Created Feb 21, 2010
Globbing implemented in Groovy
View FileGlob.groovy
// Licensed under the "Apache License, Version 2.0" (c) 2010
/**
* Returns filenames found by expanding the passed pattern which is String or
* a List of patterns.
* NOTE: that this pattern is not a regexp (it’s closer to a shell glob).
* NOTE: that case sensitivity depends on your system.
*
* <code>*</code> Matches any file. Can be restricted by other values in
* the glob pattern (same as <code>.*</code> in regexp).
* <code>*</code> will match all files,