package main | |
import ( | |
"fmt" | |
"os" | |
) | |
func main() { | |
// can handle symbolic link, but will no follow the link |
int doubler(int x) { | |
return 2 * x; | |
} |
Load testing is a good way to understand your website or web app behaviour under high traffic.
Here is how to use siege
, a simple CLI tool.
Note: Use siege only on sites you own as its traffic could be interpreted as a DDOS attack.
Using 100 concurrent requests and up to 3 seconds between requests:
"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.
And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)
Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.
Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!
__author__ = 'tom' | |
import sys | |
from PyQt5.QtWidgets import QWidget, QDesktopWidget, QApplication | |
class Example(QWidget): | |
def __init__(self): | |
super().__init__() | |
self.init_ui() |
#!/usr/bin/env python3 | |
# vim: sw=4 ts=4 et tw=100 cc=+1 | |
# | |
#################################################################################################### | |
# DESCRIPTION # | |
#################################################################################################### | |
# | |
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to | |
# compress e. g. bookmark backups (*.jsonlz4). | |
# |
QTabBar, | |
QTabBar::tab | |
{ | |
font-family: "Noto Sans"; | |
font-size: 11px; | |
height: 16px; | |
padding: 2px; | |
border: 0px; | |
border-bottom: 3px solid palette(dark); | |
background-color: palette(dark); |
object Implicits { | |
implicit class PimpedString(str: String) { | |
def everyNthChar(skipNum: Int) = (for (i <- 0 until str.length if i%skipNum==0) yield str(i)).mkString | |
//Other methods I want strings to have go here | |
} | |
implicit class PimpedInt(int: Int){ | |
//Other methods I want ints to have do here | |
} | |
} |
import getch | |
let ch = getch() | |
echo ch |