Skip to content

Instantly share code, notes, and snippets.

View rusintez's full-sized avatar
💭
🍝

vlspopov rusintez

💭
🍝
View GitHub Profile
@gyndav
gyndav / Dockerfile
Last active August 6, 2023 20:56
install Scala and sbt on Alpine Linux
FROM openjdk:8u151-jre-alpine
ENV SCALA_VERSION=2.12.4 \
SCALA_HOME=/usr/share/scala
# NOTE: bash is used by scala/scalac scripts, and it cannot be easily replaced with ash.
RUN apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
apk add --no-cache bash curl jq && \
cd "/tmp" && \
wget --no-verbose "https://downloads.typesafe.com/scala/${SCALA_VERSION}/scala-${SCALA_VERSION}.tgz" && \
@beevelop
beevelop / gitprint.js
Created April 11, 2017 10:31
Print GitHub markdown files
document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white')
document.querySelector('body').appendChild(document.querySelector('#readme'))
window.print()

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@noelboss
noelboss / git-deployment.md
Last active May 16, 2024 20:41
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@steezeburger
steezeburger / flexbox-helpers.scss
Last active June 14, 2019 08:18
Flexbox Helper Classes written in SCSS
/*
* Custom Flexbox Helper Classes
*/
.flex {
display: flex;
&.cell {
flex: 1;
}
&.equal-sizing {
'use strict';
var Benchmark = require('benchmark');
var emojis = require('emojilib');
var nearley = require('nearley');
var emojiGrammar = require('./parsers/emoji.js');
var pegjs = require('pegjs-import');
var pegjsEmoji = pegjs.buildParser('./parsers/emoji.pegjs');
var _ = require('lodash');
@sadikovi
sadikovi / CollectionUDAF.scala
Last active June 12, 2020 11:05
UDAF for generating collection of values (for a specific limit)
import org.apache.spark.sql.Row
import org.apache.spark.sql.expressions.{MutableAggregationBuffer, UserDefinedAggregateFunction}
import org.apache.spark.sql.types.{ArrayType, LongType, DataType, StructType, StructField}
class CollectionFunction(private val limit: Int) extends UserDefinedAggregateFunction {
def inputSchema: StructType =
StructType(StructField("value", LongType, false) :: Nil)
def bufferSchema: StructType =
StructType(StructField("list", ArrayType(LongType, true), true) :: Nil)
@Tolsi
Tolsi / KlangCancellableFuture.scala
Last active June 1, 2020 13:45
Viktor Klang's interruptible cancellable scala future
import java.util.concurrent.Executors
import scala.concurrent._
import scala.concurrent.duration.Duration
import scala.util.{Failure, Try}
trait CancellableFuture[T] extends Future[T] {
def future(): Future[T]
def cancel(): Unit
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 21, 2024 08:24
A template to make good README.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

@dsager
dsager / devex_news_lab.md
Last active July 22, 2021 02:51
The Devex NewsLab: Using Google Docs as a CMS

The Devex NewsLab: Using Google Docs as a CMS

Note: This post was originally published on the Devex Tech Blog

This article describes our current content management solution and gives some insight on the parts of the implementation we think are interesting.

As you might know a big part of our website is dedicated to News content covering various aspects of international development. At Devex we usually publish around 10 articles per day which are sometimes planned and worked on several days or even weeks in advance. There are different people involved in the process including both internal and external writers, editors, researchers or marketing folks. Some of them contribute to the article's content while others just need to be aware what is going on to coordinate their own work like social media campaigns.