Skip to content

Instantly share code, notes, and snippets.

View strax's full-sized avatar

Sami Kukkonen strax

View GitHub Profile
@strax
strax / snippets.json
Created October 24, 2022 13:13
VSCode snippets for Greek letters, excluding uppercase letters that have ASCII equivalents
{
"α": {
"prefix": "\\alpha",
"body": ["α"],
"description": "Greek letter alpha"
},
"β": {
"prefix": "\\beta",
"body": ["β"],
"description": "Greek letter beta"
@strax
strax / a.js
Created December 8, 2015 21:27
import Bacon from 'baconjs';
import fetch from 'node-fetch';
const makeRequest = () => fetch('https://wtfismyip.com/text');
const createThrottler = (onValue, maxConcurrencyInWindow = 5, windowLength = 5000) => {
const bus = new Bacon.Bus();
bus.flatMapWithConcurrencyLimit(maxConcurrencyInWindow, fn => (
Bacon.fromPromise(fn()).concat(Bacon.later(windowLength).filter(false))
)).onValue(onValue);
@strax
strax / .gitattributes
Created March 24, 2015 16:08
Auto-resolving schema.rb version conflicts on Rails 4.0+
db/schema.rb merge=railsschema
--langdef=CoffeeScript
--langmap=CoffeeScript:.coffee
--regex-CoffeeScript=/^[ \t]*(@?[a-zA-Z$_\.1-9]+)[ \t]*(=|\:)[ \t]*(\(.*\))?[ \t]*(-|=)>/\1/f,function/
--regex-CoffeeScript=/^[ \t]*([a-zA-Z$_1-9]+\:\:[a-zA-Z$_\.1-9]+)[ \t]*(=|\:)[ \t]*(\(.*\))?[ \t]*(-|=)>/\1/f,function/
--regex-CoffeeScript=/^[ \t]*describe[ \t]"(.+)"[ \t]*,[ \t]+[-=]>/\1/f,function/
--regex-CoffeeScript=/^[ \t]*describe[ \t]'(.+)'[ \t]*,[ \t]+[-=]>/\1/f,function/
--regex-CoffeeScript=/^[ \t]*it[ \t]"([^"]+)"[ \t]*,[ \t]+[-=]>/\1/f,function/
--regex-CoffeeScript=/^[ \t]*it[ \t]'([^']+)'[ \t]*,[ \t]+[-=]>/\1/f,function/
--regex-CoffeeScript=/^[ \t]*f+describe[ \t]"(.+)"[ \t]*,[ \t]+[-=]>/focused\: \1/f,function/
--regex-CoffeeScript=/^[ \t]*f+describe[ \t]'(.+)'[ \t]*,[ \t]+[-=]>/focused: \1/f,function/
Compiled from "BenchmarkTestSuite.java"
public class org.nx.pkg4.BenchmarkTestSuite implements java.lang.Runnable {
static {};
Code:
0: ldc #1 // class org/nx/pkg4/BenchmarkTestSuite
2: invokevirtual #14 // Method java/lang/Class.getName:()Ljava/lang/String;
5: invokestatic #20 // Method java/util/logging/Logger.getLogger:(Ljava/lang/String;)Ljava/util/logging/Logger;
8: putstatic #26 // Field LOGGER:Ljava/util/logging/Logger;
11: return
@strax
strax / -
Last active December 17, 2015 20:09
Compiled from "BenchmarkTestSuite.java"
public class org.nx.pkg4.BenchmarkTestSuite implements java.lang.Runnable {
static {};
Code:
0: ldc #1 // class org/nx/pkg4/BenchmarkTestSuite
2: invokevirtual #14 // Method java/lang/Class.getName:()Ljava/lang/String;
5: invokestatic #20 // Method java/util/logging/Logger.getLogger:(Ljava/lang/String;)Ljava/util/logging/Logger;
8: putstatic #26 // Field LOGGER:Ljava/util/logging/Logger;
11: return
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.Net;
namespace Irc
{
public class MessageReceivedEventArgs: EventArgs
sdadsaasdasdsadasd
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
ERROR: Branch origin/master not found.
ERROR: There has been an error while checking out branch master.
Halting the installation.
ERROR: There has been an error while trying to fetch the source.
Halting the installation.
package org.mcs.common
import akka.actor._
import akka.routing._
trait CPUBoundThreadPool
extends DefaultActorPool
with SmallestMailboxSelector
with BoundedCapacityStrategy
with MailboxPressureCapacitator