MySQL Download URL
https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz
- Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
/* | |
* modified from http://www.voidware.com/moon_phase.htm | |
*/ | |
function getMoonPhase(year, month, day) | |
{ | |
var c = e = jd = b = 0; | |
if (month < 3) { | |
year--; |
Step 1 - Create .crt file | |
cat domainname.crt domainname.ca-bundle > domainname-ssl-bundle.crt | |
Step 2- | |
Add lines for ssl_certificate in nginx configuration | |
server { | |
listen 80 default_server; |
// ==UserScript== | |
// @name Figma Mouse Wheel Speed Fix | |
// @namespace https://adam.nels.onl | |
// @match https://www.figma.com/* | |
// @grant none | |
// ==/UserScript== | |
// Mouse wheel scrolling in Figma on Firefox + Linux is unbearably slow. | |
// | |
// This script catches all mouse wheel events on the main canvas, |
Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
const cluster = require('cluster'); | |
const numCPUs = require('os').cpus().length; | |
const fastify = require('fastify')(); | |
const port = 8123; | |
if (cluster.isMaster) { | |
console.log(`Master ${process.pid} is running`); | |
for (let i = 0; i < numCPUs; i++) { | |
cluster.fork(); | |
} |
$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
#!/bin/bash | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
DISTRO= | |
OS= | |
if grep 'Debian' /etc/issue > /dev/null 2>&1 ; then |
// node: v0.10.21 | |
// request: 2.27.0 | |
var request = require('request'); | |
var fs = require('fs'); | |
var r = request.post("http://server.com:3000/"); | |
// See http://nodejs.org/api/stream.html#stream_new_stream_readable_options | |
// for more information about the highWaterMark | |
// Basically, this will make the stream emit smaller chunks of data (ie. more precise upload state) | |
var upload = fs.createReadStream('f.jpg', { highWaterMark: 500 }); |
#!/bin/bash | |
# Get postman app | |
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
sudo tar -xzf postman.tar.gz -C /opt | |
sudo ln -s /opt/Postman/Postman /usr/bin/postman | |
#Create a Desktop Entry | |
cat > ~/.local/share/applications/postman.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 |