A simple force layout with labeled links. The labels appear only if the adjacent nodes are hovered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ImageStatic from 'ol/source/ImageStatic'; | |
import ImageCanvas from 'ol/ImageCanvas'; | |
import EventType from 'ol/events/EventType'; | |
import {listen} from 'ol/events'; | |
class Canvas extends ImageStatic { | |
constructor(options) { | |
super(options); | |
this.image_ = new ImageCanvas(options.imageExtent, 1, 1, options.canvas); | |
listen(this.image_, EventType.CHANGE, this.handleImageChange, this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
# https://gist.github.com/mzur/106444b27d09a14d9c164fc44fdeadef | |
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos | |
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423 | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
# (if you're backing up a user's repos instead, this should be your GitHub username); also see the note below about the `REPOLIST` definition around line 48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header::contentType('application/json'); | |
$errors = ''; | |
// check each parameter of the request if it is erroneous | |
foreach (array_keys(get()) as $field) { | |
$errors .= $form->hasError($field) ? "\"$field\"," : ''; | |
} | |
// strip trailing comma | |
$errors = substr($errors, 0, -1); |
#How to set up gedit with automatic LESS CSS compiling
##Install the compiler
Install the command line LESS compiler. For example in Ubuntu use sudo apt-get install node-less
. Alternatively you can install it using the Node Package Manager sudo atp-get install npm
and then npm install -g less
for the guaranteed newest version.
Now you are able to compile LESS files using lessc my_less_file.less my_css_file.css
but this really sucks if you are setting up the CSS for a new website and have to compile it frequently.
Fortunately there is gedit; the lightweight text editor of your choice ;-)