This script will download and replace ~/Applications/VSCode-linux-x64
with the latest VS Code Insiders.
- Install
jq
: https://stedolan.github.io/jq/download/ - Place
update-code
somewhere in yourPATH
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"time" | |
"github.com/gin-gonic/gin" | |
) |
This script will download and replace ~/Applications/VSCode-linux-x64
with the latest VS Code Insiders.
jq
: https://stedolan.github.io/jq/download/update-code
somewhere in your PATH
If you are running ArchLinux, run the following command instead (see here for why):
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
Then paste it in your terminal and press on enter to run it.
SPC | |
SPC: find file | |
, switch buffer | |
. browse files | |
: MX | |
; EX | |
< switch buffer | |
` eval | |
u universal arg | |
x pop up scratch |
//Example 1 - Calculate average value of an array (transform array into a single number) | |
var scores = [89, 76, 47, 95] | |
var initialValue = 0 | |
var reducer = function (accumulator, item) { | |
return accumulator + item | |
} | |
var total = scores.reduce(reducer, initialValue) | |
var average = total / scores.length | |
/*Explain about function |
Code is clean if it can be understood easily β by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// Implementation for 3D from Gregory Schlomoff's Unity source: http://gregschlom.com/devlog/2014/06/29/Poisson-disc-sampling-Unity.html | |
/// | |
/// Usage: | |
/// PoissonDiskSampler3D sampler = new PoissonDiskSampler3D(10, 5, 7.5f, 0.3f); | |
/// foreach (Vector3 sample in sampler.Samples()) { | |
/// // ... do something, like instantiate an object at (sample.x, sample.y, sample.z) for example: |
<!DOCTYPE html> | |
<!-- How to create Mouse Events for D3 --> | |
<html> | |
<head> | |
<!-- Load D3 from site --> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<!-- CSS (Styling) --> | |
<style type="text/css"> |
Scrolling through big amounts of time series data.
In fast mode, scrolling is achieved by moving a parent "g" element to the left or right. Entering and exiting of data is done at the end of dragging. In slow mode, entering, exiting and updating of data is done during the dragging.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.