Skip to content

Instantly share code, notes, and snippets.

View lefou's full-sized avatar

Tobias Roeser lefou

  • Freelancer, working remotely
  • Germany, Lusatia
  • 11:16 (UTC +02:00)
  • Mastodon @[email protected]
View GitHub Profile
@paulp
paulp / gist:0afcb4977181a0d017b4
Last active August 29, 2015 14:22
string literal redundancy in scala/scala
% ack --no-filename --java --scala -o '".*?"' |stats |egrep -v '^\s*[1-4]\s+' | sort-by-length
4062 ""
5 "8"
6 "H"
6 "M"
6 "N"
6 "k"
6 "v"
7 "P"
7 "U"
@dougireton
dougireton / recruiter_response.md
Last active January 11, 2020 22:52
I've started responding to recruiters with this list of requirements

Company Requirements

I'm definitely not looking for work. However to provide some helpful guidance for hiring like-minded engineers, I would only consider working for a company if it met these requirements:

  1. Fewer than 250 employees.
  2. Concrete, measurable plan to increase the number of women and minorities in engineering roles.
  3. Commitment to using and contributing to open source.
  4. Collaborative, friendly atmosphere where pair programming is encouraged.
  5. Meaningful work with clear linkage between work and company goals.
  6. Demonstrated commitment to ethical business practices, e.g. B corp certification.
@viktorklang
viktorklang / dockless.sh
Created May 27, 2014 12:15
"Permanently" hide the Dock
#!/bin/bash
#########################################################################################################################
# MIT License
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@milessabin
milessabin / gist:c51b6851548dae403abf
Created May 9, 2014 10:11
Type safe selectDynamic without macros
miles@frege:~$ scala
Welcome to Scala version 2.11.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_55).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import scala.language.dynamics
import scala.language.dynamics
scala> case class Assoc[K, V](value: V)
defined class Assoc
# ~/.screenrc
# use visual bell
vbell on
# set a big scrolling buffer
defscrollback 1000
# Set the caption on the bottom line
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"
anonymous
anonymous / IBAN.scala
Created January 16, 2014 03:01
Helps german, austrian and swiss to calculate IBANs from their old account data. On a side-note, you don't need a BIC inside your country, IBAN is enough.
package io.sepa.hbci
/**
* Helps german, austrian and swiss to calculate IBANs from their old account data.
* On a side-note, you don't need a BIC inside your country, IBAN is enough.
*/
object IBAN {
/**
* @param country 2-letter ISO country code
* @param kto Kontonummer / Accountnumber
@nachocab
nachocab / instructions.sh
Last active February 13, 2022 15:45
How to make git diff work perfectly with .docx files in Mac OS X (it even colors by word)
# download docx2txt by Sandeep Kumar
wget -O docx2txt.pl http://www.cs.indiana.edu/~kinzler/home/binp/docx2txt
# make a wrapper
echo '#!/bin/bash
docx2txt.pl $1 -' > docx2txt
chmod +x docx2txt
# make sure docx2txt.pl and docx2txt are your current PATH. Here's a guide
http://shapeshed.com/using_custom_shell_scripts_on_osx_or_linux/
@lefou
lefou / scala.nanorc
Last active November 18, 2021 05:06
Color theme for console editor nano, supporting Scala language.
## Nano color theme for Scala.
## 2013, 2018, Tobias Roeser
##
syntax "scala" "\.(scala|sbt|sc)$"
color green "\<(new|this|transient)\>"
color green "\<(catch|do|else|finally|for|if|match|return|switch|throw|try|val|var|while)\>"
color green "\<(def|abstract|class|extends|final|import|package|private|protected|public|trait|volatile)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)|\+|\-|\*|\/"
color red "@(\\.|[^(])*"
color yellow "\<(true|false|null)\>"