Skip to content

Instantly share code, notes, and snippets.

View idarlington's full-sized avatar

Ikenna Ogbajie idarlington

View GitHub Profile
@merlinmann
merlinmann / Better.md
Last active July 28, 2024 13:11
Original version of Merlin Mann's essay, "Better."

Better

Politics, celebrity gossip, business headlines, tech punditry, odd news, and user-generated content.

These are the chew toys that have made me sad and tired and cynical.

Each, in its own way, contributes to the imperative that we constantly expand our portfolio of shallow but strongly-held opinions about nearly everything. Then we're supposed to post something about it. Somewhere.

From businesses we've never heard of, to countries we've never visited, to infants who've had the random misfortune to be born into a family that's on TV -- it's all grist for obvious jokes and shortsighted commentary that, for at least a few minutes, helps both the maker and the consumer feel a little less bored, a little less vulnerable, and a little less disconnected. For a minute, anyway, it makes us feel more alive. Does me, anyway.

@NicolaeNMV
NicolaeNMV / akka-intellij-worksheet-work-arround.md
Last active February 17, 2021 15:35
How to run akka actors in Intelij Worksheet

Missing resource

Scala code run from Intellij Worksheet doesn't seem to be able to find the akka actor resources.

The error is:

com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka'

There is an opened ticket on Intellij bugtracker https://youtrack.jetbrains.com/issue/SCL-9229 with a work arround

Getting Started in Scala

This is my attempt to give Scala newcomers a quick-and-easy rundown to the prerequisite steps they need to a) try Scala, and b) get a standard project up and running on their machine. I'm not going to talk about the language at all; there are plenty of better resources a google search away. This is just focused on the prerequisite tooling and machine setup. I will not be assuming you have any background in JVM languages. So if you're coming from Python, Ruby, JavaScript, Haskell, or anywhere…  I hope to present the information you need without assuming anything.

Disclaimer It has been over a decade since I was new to Scala, and when I was new to Scala, I was coming from a Java and Ruby background. This has probably caused me to unknowingly make some assumptions. Please feel free to call me out in comments/tweets!

One assumption I'm knowingly making is that you're on a Unix-like platform. Sorry, Windows users.

Getting the JVM

@mslinn
mslinn / PomToSbt.scala
Last active March 18, 2022 01:10
Convert pom.xml to build.sbt
import scala.xml._
// To convert a Maven pom.xml to build.sbt:
// 1) Place this code into a file called PomToSbt.scala next to pom.xml
// 2) Type scala PomtoSbt.scala > build.sbt
// The dependencies from pom.xml will be extracted and place into a complete build.sbt file
// Because most pom.xml files only refernence non-Scala dependencies, I did not use %%
val lines = (XML.load("pom.xml") \\ "dependencies") \ "dependency" map { dependency =>
val groupId = (dependency \ "groupId").text
val artifactId = (dependency \ "artifactId").text
@cuixin
cuixin / ssdb
Created September 23, 2014 05:29
ssdb service script
#!/bin/sh
# ssdb service by Steven
# put this file in /etc/init.d/ssdb
# sudo update-rc.d ssdb defaults
start(){
echo "start ssdb"
/usr/local/ssdb/ssdb-server -d /usr/local/ssdb/ssdb.conf
exit 0
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@retronym
retronym / twenty-two.md
Last active June 24, 2016 12:46
Case Class Field Limit quotes

Jan Kotek:

I understand practical reasons behind having only 22 tuples (code readability etc). But why there is limit for 22 fields on case class? It is like limitation from 30 years old Fortran.

You may say that case class with 22 fields is monster and I should not use it. It is not true. I use default values and copy method. It is well readable and more efficient than property map.

@tdd
tdd / gitconfig.ini
Last active October 29, 2024 15:45
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = [email protected]
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases