Skip to content

Instantly share code, notes, and snippets.

View adam-singer's full-sized avatar
👾

Adam Singer adam-singer

👾
View GitHub Profile
@visenger
visenger / install_scala_sbt.sh
Last active January 31, 2023 19:10
Scala and sbt installation on ubuntu 12.04
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb
sudo dpkg -i scala-2.11.4.deb
sudo apt-get update
@sma
sma / lua.dart
Last active December 16, 2015 20:39
A parser and simple runtime system for a Lua interpreter written in Dart. Have fun with it! Should work with Dart M4.
// Copyright 2013 Stefan Matthias Aust. Licensed under MIT (http://opensource.org/licenses/MIT)
import 'dart:math' show pow;
/*
* This is a parser and runtime system for Lua 5.x which lacks most if not all of the Lua standard library.
* I created the parser a couple of years ago and now ported it to Dart just to see how difficult it would be.
*/
void main() {
@damondouglas
damondouglas / hop_runner.dart
Last active December 16, 2015 20:39
Chained webui compiler.
library hop_runner;
import 'dart:async';
import 'dart:io';
import 'package:hop/hop.dart';
import 'package:hop/hop_tasks.dart';
void main() {
final String out = "out";
@trinitronx
trinitronx / truecrypt_fix.bash
Last active November 4, 2025 11:07 — forked from jimjh/truecrypt_fix.bash
Fixes annoying brew doctor messages caused by Truecrypt
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
@vitorbritto
vitorbritto / devlist-bookmarks.md
Last active September 23, 2025 21:25
A BADASS list for faster Web Development! Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

Dev List Bookmarks

Attention: the list was moved to https://github.com/vitorbritto/dev-list

This page is not maintained anymore, please update your bookmarks.


Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

@thara
thara / operator_to_list_by_mixin.dart
Last active December 15, 2015 11:49
Mix-in sample in Dart. I want to make Seq looks like Seq in Scala...
import 'package:unittest/unittest.dart';
void main() {
print("intersect");
(new Seq([1, 2, 3]) & new Seq([2, 3, 4])).forEach(print);
print("union");
(new Seq([1, 2, 3]) | new Seq([2, 3, 4])).forEach(print);
@Swader
Swader / build.dart
Created March 14, 2013 18:25
Recursive folder copy in Dart: An updated Dart web_ui build script which recursively copies a folder and its contents to another location. Useful when building for a defined vhost (e.g. Apache with PHP back end for your Dart app) and don't want the build script to relativize your paths to go "one folder up" back from /out into /web to get CSS an…
import 'dart:io';
import 'package:web_ui/component_build.dart';
// Ref: http://www.dartlang.org/articles/dart-web-components/tools.html
main() {
build(new Options().arguments, ['web/index.html']);
//recursiveFolderCopySync('web/assets', 'web/out/assets');
}
bool isSymlink(String pathString) {
@thara
thara / DCI-sample.dart
Last active December 14, 2015 20:38
A simple DCI sample with Mix-in in Dart.
import 'package:unittest/unittest.dart';
import 'dart:async';
main () {
test("DCI sample in Dart", () {
var checking = new Account(balance : 50);
var saving = new Account(balance : 45);
anonymous
anonymous / sparseintvector2.dart
Created September 3, 2012 12:40
dart sparseintvector new (still 50x slower than java)
#import('dart:math');
class SparseIntVector {
static int collision = 0;
static final int INITIAL_SIZE = 8;
static final double DEFAULT_LOAD_FACTOR = 0.7;
int modulo = INITIAL_SIZE - 1;
List<int> keys;
List<int> values;
// Sending futures across isolate boundaries.
#import('dart:isolate', prefix: 'isolate');
// FutureSendPort/FutureReceivePorts are ports for sending and receiving futures
// When connecting futures across isolates boundaries they do it by
// building the following structure:
//
// ISOLATE A
// [Future] --events--> [Completer SendPort]