Skip to content

Instantly share code, notes, and snippets.

View mhluska's full-sized avatar

Maros Hluska mhluska

View GitHub Profile
app
├─┬ @zestia/ember-simple-infinite-scroller@1.0.14
│ ├─┬ ember-cli-babel@6.10.0
│ │ ├── amd-name-resolver@0.0.7 deduped
│ │ ├── babel-plugin-debug-macros@0.1.11 deduped
│ │ ├── babel-plugin-ember-modules-api-polyfill@2.3.0 deduped
│ │ ├── babel-plugin-transform-es2015-modules-amd@6.24.1 deduped
│ │ ├── babel-polyfill@6.26.0 deduped
│ │ ├── babel-preset-env@1.6.1 deduped
│ │ ├── broccoli-babel-transpiler@6.1.2 deduped
@mhluska
mhluska / gemini.sh
Last active November 22, 2017 15:33
Transfer money into Gemini exchange (no API, no Selenium)
#!/bin/bash
# Exit on error or unset variable.
set -e
set -u
source .env
# TODO: Find a builtin way to do this.
function urldecode() {
@mhluska
mhluska / match_images.py
Created October 9, 2016 04:55
Quick and dirty script to match similar images using image_match
from image_match.goldberg import ImageSignature
import glob
BASE_DIR='/Users/maros.hluska/Dropbox'
BASE_IMAGE='./crop.png'
gis = ImageSignature()
def filenames(extension):
return glob.iglob(BASE_DIR + '/**/*.' + extension, recursive=True)
#!/bin/sh
# See https://github.com/xiaohan2012/twitter-sent-dnn
if [ "${#}" -eq 0 ]; then
echo "Usage: ${0} message"
exit 1
fi
html=$(curl 'https://twitter-sentiment-cnn.herokuapp.com/' \
@mhluska
mhluska / bot.rb
Last active September 1, 2016 11:28
Basic Tinder bot with sentiment analysis
require 'dotenv'
require 'tinderbot'
require 'sentimental'
Dotenv.load!
class Bot
MAX_DAYS_SINCE_REPLY = 5
MAX_DAYS_SINCE_MESSAGE = 2
MAX_DISTANCE_MI = 100

Keybase proof

I hereby claim:

  • I am mhluska on github.
  • I am mhluska (https://keybase.io/mhluska) on keybase.
  • I have a public key whose fingerprint is 403B 415D BC91 5B2A EE0F 6400 7F0F 9605 C7F9 D7F8

To claim this, I am signing this object:

# O(n), n = total number of bits
def count_bits1(num):
count = 0
while num > 0:
if num % 2 == 1:
count += 1
num //= 2
return count
@mhluska
mhluska / config.rb
Last active August 29, 2015 14:27
middleman-livereload issue config.rb
configure :development do
activate :livereload
activate :dotenv
end
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
@mhluska
mhluska / Gemfile.lock
Created August 13, 2015 17:30
middleman-livereload gemfile.lock
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.3)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
@mhluska
mhluska / Gemfile
Last active August 29, 2015 14:27
middleman-livereload issue gemfile
source 'https://rubygems.org'
gem 'middleman'
gem 'middleman-blog'
gem 'middleman-dotenv'
gem 'middleman-deploy'
gem 'middleman-livereload'
gem 'octokit'
gem 'rake'
gem 'byebug'