Skip to content

Instantly share code, notes, and snippets.

View djodjoni's full-sized avatar

Kalin Maldzhanski djodjoni

View GitHub Profile
@djodjoni
djodjoni / README.md
Created July 19, 2017 12:34 — forked from maartenzam/README.md
Responsive map with Cartodb/Leaflet

CartoDB/Leaflet map that adapts map dimensions (height) and zoom level based on map width. Open in new window and resize to view responsiveness.

@djodjoni
djodjoni / businesses.json
Created July 19, 2017 12:27 — forked from zross/businesses.json
Leaflet.js Tips, Step 7 (filter buttons)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Obtain the label of a given class (:class1).
SELECT DISTINCT ?c (STR(?l) AS ?lb)
WHERE {
?c a :class1 ;
<http://www.w3.org/2000/01/rdf-schema#label> ?l .
}
# Obtain a list of classes.
SELECT DISTINCT ?c
WHERE {
@djodjoni
djodjoni / Fibonacci.java
Created May 31, 2017 06:31 — forked from benjchristensen/Fibonacci.java
Fibonacci + Rx
import java.util.HashMap;
import rx.Observable;
import rx.Subscriber;
public class Fibonacci {
public static void main(String... args) {
// via Observable.create
fib.take(13).forEach(System.out::println);
@djodjoni
djodjoni / .travis.yml
Created March 29, 2017 08:50 — forked from willprice/.travis.yml
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@djodjoni
djodjoni / auto-deploy.md
Created March 29, 2017 08:49 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@djodjoni
djodjoni / Android Privacy Policy Template
Created February 13, 2017 11:52 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@djodjoni
djodjoni / gitconfig.ini
Created December 21, 2016 09:41 — forked from tdd/gitconfig.ini
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status
@djodjoni
djodjoni / NestedScrollViewScrollToAction.java
Created November 25, 2016 21:04 — forked from miszmaniac/NestedScrollViewScrollToAction.java
NestedScrollViewScrollToAction because regular ScrollTo doesn't work
package com.example.NestedScrollViewScrollToAction;
import android.graphics.Rect;
import android.support.design.widget.CoordinatorLayout;
import android.support.test.espresso.PerformException;
import android.support.test.espresso.UiController;
import android.support.test.espresso.ViewAction;
import android.support.test.espresso.matcher.ViewMatchers.Visibility;
import android.support.test.espresso.util.HumanReadables;
import android.support.v4.widget.NestedScrollView;
@djodjoni
djodjoni / gist:040fd8d14ed069eb742bb3f50ee39a06
Created October 22, 2016 19:55 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: