Skip to content

Instantly share code, notes, and snippets.

@lydonchandra
lydonchandra / x3d.sql
Created September 20, 2019 11:55
x3d test
SELECT '<X3D>
<Scene>
<Transform>
<Shape>
<Appearance>
<Material emissiveColor=''0 0 1''/>
</Appearance> ' ||
st_asx3d(
ST_Extrude(
ST_Buffer(ST_GeomFromText('POINT(100 90)'),
var cesiumViewer = window.viewer.state ? window.viewer.state.viewer: window.viewer
var camera = cesiumViewer.scene.camera
var scene = cesiumViewer.scene
var Cartesian3 = Cesium.Cartesian3
cesiumViewer.entities.removeAll()
scene.requestRender()
var radius = 1
var position = camera.position
@lydonchandra
lydonchandra / rayTraceTest.js
Last active September 3, 2019 16:52
rayTraceTest.js
var cesiumViewer = window.viewer.state ? window.viewer.state.viewer: window.viewer
var camera = cesiumViewer.scene.camera
var scene = cesiumViewer.scene
//var scratchCart3 = new Cesium.Cartesian3()
var radius = 5
cesiumViewer.entities.add(
{
@lydonchandra
lydonchandra / console.image.js
Created August 29, 2019 09:58
console.image.js - display image in console.log
console.image = function(url, sizePercent = 100, message) {
var image = new window.Image();
image.onload = function() {
var style = [
'font-size: 1px;',
'padding: ' + this.height/100*sizePercent + 'px ' + this.width/100*sizePercent + 'px;',
'background: url('+ url +') no-repeat;',
'background-size: contain;',
'message: ' + message + ';'
@lydonchandra
lydonchandra / HideJobs.user.js
Last active May 29, 2019 03:04 — forked from Tiny-Giant/HideJobs.user.js
Hides references to Stack Overflow Jobs
// ==UserScript==
// @name Hide Jobs
// @namespace http://github.com/Tiny-Giant
// @version 1.0.0.1
// @description Hides references to Stack Overflow Jobs
// @author @TinyGiant
// @include /https?:\/\/(meta\.)?stackoverflow\.com/.*/
// @grant none
// ==/UserScript==
/* jshint -W097 */
@lydonchandra
lydonchandra / htmlEscapeIfNeeded.js
Created November 14, 2018 05:19
htmlEscapeIfNeeded.js
/*globals angular*/
(function () {
'use strict';
angular.module('xx.utilities')
.filter('html', ['$sce', function ($sce) {
return function (text) {
var entityMap = {
escape: {
var GpsNoTrackingToggleToolView = GpsToggleToolView.extend({
initialize: function(api, button, group) {
GpsToggleToolView.prototype.initialize.apply(this, arguments);
this.api = api;
this.button = button;
this.$el.delegate('a#' + this.button.id, 'click', _.bind(this.onClick, this));
this.GPS_STATES = {
'off' : _.bind(function off() {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.