Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dmaii on github.
  • I am dmaii (https://keybase.io/dmaii) on keybase.
  • I have a public key ASAzV1o2VV3NPdXNfhtQVkGJDj7wuIxmYPe4dOGHYCWoigo

To claim this, I am signing this object:

@dmaii
dmaii / Dockerfile
Created May 18, 2017 23:54
selenium docker fail
FROM selenium/standalone-firefox
USER root
# screenshot default port is 3000
EXPOSE 3000
# netcat is used by scripts/ci-tests to check if the server is up
# vim is installed cuz lulz
RUN apt-get update && apt-get install -y \
curl \
/**
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
**/
/**
* @param {number[]} nums
* @return {number}
module.exports = function(sequelize, DataTypes) {
var options, schema;
schema = {
reference_id: {
type: DataTypes.INTEGER,
allowNull: false
},
name: {
type: DataTypes.TEXT
}
db.sequelize.transaction(function(t) {
teamModel.destroy({ id: 1}, { transaction: t }).success().error(function(errors) {
console.log(errors);
t.commit();
});
});
db.sequelize.transaction(function(t) {
userModel.destroy({ id: 1}, { transaction: t }).success().error(function(errors) {
console.log(errors);
});
});
@dmaii
dmaii / CoinDeterminer.java
Created January 31, 2014 03:16
Coderbyte Problems for Reshad
import java.util.*;
import java.io.*;
class Function {
String CoinDeterminer(int sum) {
int[] coins = {1,5,7,9,11};
List<Integer> knapsack = new ArrayList<Integer>();
knapsack.add(0);
knapsack.add(1);