Skip to content

Instantly share code, notes, and snippets.

View beginor's full-sized avatar
💭
Coding for code!

beginor beginor

💭
Coding for code!
View GitHub Profile
@jsanz
jsanz / fix-geometries.py
Created October 30, 2019 16:40
Python - QGIS - Fix geometries
"""
Small script to fix geometries of the first file argument
using the native QGIS processing algorithm. You may need
to adjust the path to you installation.
"""
import sys
sys.path.append('/usr/share/qgis/python/plugins')
from processing.core.Processing import Processing
@vkuchinov
vkuchinov / app.js
Last active October 17, 2023 08:39
MapboxGL | THREE.JS Multiple Objects Mockup
var data = [
{ label: "Shandy Park", LngLat: [-0.039951, 51.520465], value: 18.78, color: 0x0074D9 },
{ label: "Mile End Park", LngLat: [-0.034683, 51.521343], value: 38.77, color: 0x85144B },
{ label: "Tower Hamlets Cemetery Park", LngLat: [-0.027022, 51.523187], value: 45.0, color: 0x39CCCC },
{ label: "Meath Gardens", LngLat: [-0.043844, 51.527939], value: 51.55, color: 0xB10DC9 },
{ label: "Tredegar Square", LngLat: [-0.032144, 51.527107], value: 16.01, color: 0x2ECC40 },
{ label: "Carlton Square & Gardens", LngLat: [-0.044712, 51.523860], value: 60.84, color: 0xFFDC00 }
];
@thw0rted
thw0rted / cesium.d.ts
Last active May 27, 2020 08:10
Updated typings file for Cesium v1.69 (I think?)
/**
* Cesium type definitions
* For use with Cesium v1.66
* Created by Aigars Zeiza <https://github.com/Zuzon>
* Modified by Harry Nicholls <harry@northstar-robotics.com>
* Updated for v1.66.0 by James Bromwell <https://github.com/Thw0rted>
*/
declare module "cesium"{
type RenderState = any;
@tschaub
tschaub / .gitignore
Last active April 25, 2019 22:34
OpenLayers + Rollup
/node_modules/
bundle.js
@green3g
green3g / dojo.js
Last active February 19, 2017 12:08
SystemJS Dojo Loader
exports = {
fetch: function(load, fetch) {
console.log('load', load);
let module = load.name.split('!')[0];
return new Promise(function(resolve) {
//use dojo's require and then register the module
window.require([module], function(mod) {
System.register(module, [], function(exp, idObj) {
var result = {
setters: [],
@MarioAriasC
MarioAriasC / spark.kt
Last active December 21, 2019 11:22
Word Count with Apache Spark and Kotlin
package org.cakesolutions.spark
import org.apache.spark.SparkConf
import org.apache.spark.api.java.JavaSparkContext
import scala.Tuple2
fun main(args: Array<String>) {
val inputFile = args[0]
val outputFile = args[1]
@brandonsimpson
brandonsimpson / osx_uninstall_mysql_install_mariadb_homebrew.md
Last active August 19, 2023 22:55
OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.

First: Backup Your Data!

Backup all of your current databases with mysqldump

This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.

@dominicfarr
dominicfarr / shiro.ini
Last active March 9, 2021 05:37
example jdbcRealm configured in shiro.ini
[main]
ds = com.mysql.jdbc.Driver
ds.serverName = localhost
ds.user = user
ds.password = password
ds.databaseName = db_name
jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm
jdbcRealm.dataSource = $ds
jdbcRealm.permissionsLookupEnabled = true
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@mahdi
mahdi / .gitignore
Created August 2, 2011 08:10
A .gitignore file for a .NET developer
#Junk Files
*.DS_Store
[Tt]humbs.db
#Visual Studio Files
[Oo]bj
[Bb]in
[Dd]ebug
[Bb]uild/
*.user