Skip to content

Instantly share code, notes, and snippets.

@torbjon
torbjon / gpxsmooth.py
Created March 9, 2023 15:55 — forked from jdeblese/gpxsmooth.py
Path smoothing script for GPX files
import math
import numpy
import sys, os
from lxml import etree
Re = 6371000 # Earth radius in meters
# Extract the latitute and longitude as a tuple in radians from a <trkpt> element
def extract(trkpt) :
import EditorPlugin = prezi_plugin_api.EditorPlugin;
import ApplicationApi = prezi_plugin_api.ApplicationApi;
import ApplicationUI = prezi_plugin_api.ApplicationUI;
import UIRoot = prezi_plugin_api.UIRoot;
import MenuId = prezi_plugin_api.MenuId;
type UIState = {
name: string;
urls: string[];
progress: prezi_plugin_api.ListProgress;
location / {
rewrite ^(.+)/$ $1 permanent;
proxy_pass http://upstream.app;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X_Forwarded_Proto $scheme;
@torbjon
torbjon / javascript_resources.md
Created June 9, 2014 05:17 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@torbjon
torbjon / rails_resources.md
Created June 9, 2014 05:17 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@torbjon
torbjon / 0_reuse_code.js
Created June 9, 2014 05:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@torbjon
torbjon / gist:6898308
Created October 9, 2013 08:53
abs gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
@torbjon
torbjon / gradle
Created October 4, 2013 06:07
gradle sliding menu
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
@torbjon
torbjon / kaminari.yml
Last active December 19, 2015 22:29
kaminari lv, ru, en
lv:
views:
pagination:
first: '&laquo; pirmā'
last: 'pēdējā &raquo;'
previous: '&lsaquo; iepriekšējā'
next: 'nākamā &rsaquo;'
truncate: '...'
en:
1. problemu risinasana, ieteikumi
2. tikai lv valoda
3. ruby related
4. katrs var pievienot, bet pec pievienosanas jaunajam vajag par sevi nedaudz pastastit
5. ja specifisks, tad uz privato