A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
| #!/bin/bash | |
| sysctl net.core.rmem_default=268435456 | |
| sysctl net.core.wmem_default=268435456 | |
| sysctl net.core.rmem_max=268435456 | |
| sysctl net.core.wmem_max=268435456 | |
| sysctl net.core.netdev_max_backlog=100000 | |
| sysctl "net.ipv4.tcp_rmem=4096 16384 134217728" | |
| sysctl "net.ipv4.tcp_wmem=4096 16384 134217728" | |
| sysctl "net.ipv4.tcp_mem=786432 1048576 268435456" |
| package main | |
| import ( | |
| "encoding/json" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) | |
| type Message struct { |
| package main | |
| import ( | |
| "net/http" | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "os" | |
| ) |
| <html> | |
| <head> | |
| <title>WebSocket demo</title> | |
| </head> | |
| <body> | |
| <div> | |
| <form> | |
| <label for="numberfield">Number</label> | |
| <input type="text" id="numberfield" placeholder="12"/><br /> |
| var Hapi = require('hapi'); | |
| var server = new Hapi.Server(); | |
| server.connection({ | |
| host: 'localhost', | |
| port: 8000 | |
| }); | |
| server.ext('onRequest', function (request, reply) { |
Every reason to get more HackerPoints™ is a good one, so today we're going to
write a neat command line app in .NET Core! The Common library has a really cool
package Microsoft.Extensions.CommandlineUtils to help us parse command line
arguments and structure our app, but sadly it's undocumented.
No more! In this guide, we'll explore the package and write a really neat console app. We'll get good practices, a help system and argument parsing for free. Oh, it also involves ninjas. Insta-win.
| var soap = require('soap'), | |
| fs = require('fs'); | |
| client = soap.createClient('https://some-webserv.ic/something.wsdl', { | |
| wsdl_options: { | |
| cert: fs.readFileSync('cert.pem'), | |
| key: fs.readFileSync('keyfile.key') | |
| } | |
| }, function(err, client){ | |
| console.log(client.describe()); |