-loglevel debug
- Join TS Files
- Convert TS to MP4
- Download Online AES-128 Encrypted HLS video
- Convert Video to GIF
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "os/exec" | |
| "time" | |
| ) | |
| func run(timeout int, command string, args ...string) string { |
My current editor of choice for all things related to Javascript and Node is VS Code, which I highly recommend. The other day I needed to hunt down a bug in one of my tests written in ES6, which at time of writing is not fully supported in Node. Shortly after, I found myself down the rabbit hole of debugging in VS Code and realized this isn't as straightforward as I thought initially. This short post summarizes the steps I took to make debugging ES6 in VS Code frictionless.
My first approach was a launch configuration in launch.json mimicking tape -r babel-register ./path/to/testfile.js with babel configured to create inline sourcemaps in my package.json. The debugging started but breakpoints and stepping through the code in VS Code were a complete mess. Apparently, ad-hoc transpilation via babel-require-hook and inline sourcemaps do not work in VS Code. The same result for
attaching (instead of launch) to `babel-node
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
| // The first script tag is optional if you start with javascript | |
| //<script> | |
| $(document).ready(function () { | |
| $("body").append("<br>jQuery said AngularJS rocks!"); | |
| alert($(document).html()); | |
| }); | |
| angular.module('PricesApp', []) | |
| .controller("PriceController", function () { |
| # On slow systems, checking the cached .zcompdump file to see if it must be | |
| # regenerated adds a noticable delay to zsh startup. This little hack restricts | |
| # it to once a day. It should be pasted into your own completion file. | |
| # | |
| # The globbing is a little complicated here: | |
| # - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct. | |
| # - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error) | |
| # - '.' matches "regular files" | |
| # - 'mh+24' matches files (or directories or whatever) that are older than 24 hours. | |
| autoload -Uz compinit |
I'm quite confused as there seems to be multiple redundant ways to solve my problem (read a file, parse the content, serve it via http). Most people on stackoverflow would use bufio, but I just can't get the differences between this package and the Buffer type of bytes and just reading a file with the os methods. Also I don't know when and why I should choose those ways to do it, when I have the simple, but non-versatile, ioutils.ReadFile.
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.drawable.BitmapDrawable; | |
| import android.util.Log; | |
| import java.io.ByteArrayInputStream; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.IOException; | |
| import java.nio.ByteBuffer; |
| [General] | |
| loglevel = notify | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
| bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
| # dns-server = 119.29.29.29,223.5.5.5,114.114.115.115 | |
| # external-controller-access = [email protected]:6155 | |
| # ipv6 = true | |
| // REMEMBER TO CHANGE THE external-controller-access' PASSWORD |