In the home directory make a .my.cnf file
touch ~/.my.cnf
Ensure it has your login details.
[mysqldump]
user=yourdbusername
password=yourdbpassword
/* Quadtree by Ozan Turgut (ozanturgut@gmail.com) | |
A Quadtree is a structure for managing many nodes interacting in space by | |
organizing them within a tree, where each node contains elements which may | |
interact with other elements within the node. This is particularly useful in | |
collision detection, in which a brute-force algorithm requires the checking of | |
every element against every other element, regardless of their distance in space. | |
This quadtree handles object in 2d space by their bounding boxes. It splits | |
a node once it exceeds the object limit per-node. When a node is split, it's |
class MyNumericUpDown : NumericUpDown | |
{ | |
protected override void OnMouseWheel (MouseEventArgs e) | |
{ | |
// remove scrolllines scaling, taking care of case scrolllines is 0 | |
int delta = e.Delta / Math.Max (Math.Abs (SystemInformation.MouseWheelScrollLines), 1); | |
base.OnMouseWheel (new MouseEventArgs (e.Button, e.Clicks, e.X, e.Y, delta)); | |
} | |
} |
rabbitmqctl stop_app | |
rabbitmqctl reset | |
rabbitmqctl start_app |
In the home directory make a .my.cnf file
touch ~/.my.cnf
Ensure it has your login details.
[mysqldump]
user=yourdbusername
password=yourdbpassword
// Given an Async Function (Not a promise) this class will ensure that the run method can only run 1 instance of that async operation at a time. | |
class AsyncSingleInstance { | |
// Soon we will have private fields? https://github.com/tc39/proposal-class-fields#private-fields | |
//#inProgress; | |
//#asyncFunction; | |
constructor(asyncFunction) { | |
this.inProgress = false; | |
this.asyncFunction = asyncFunction; | |
} |
for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done |
var fs = require('fs'); | |
var http = require('http'); | |
var forceredownload = false; | |
function downloadFile(url, file, callback, redirect_count, known_size) { | |
console.log('Attempting to download ' + url + ' to ' + file); | |
if (redirect_count) { | |
if (redirect_count > 5) { | |
callback('Max redirects reached', url); | |
return; |
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="SceneViewFocusChangerWindow.cs" company="Supyrb"> | |
// Copyright (c) 2018 Supyrb. All rights reserved. | |
// </copyright> | |
// <author> | |
// Johannes Deml | |
// send@johannesdeml.com | |
// </author> | |
// -------------------------------------------------------------------------------------------------------------------- |
#!/bin/sh | |
# auto-reload supervisor config on a config file change | |
# Licensed under Public Domain | |
# apt-get install inotify-tools | |
while true; do | |
inotifywait --quiet --recursive --event create,close_write /etc/supervisor/ | |
supervisorctl reread | |
supervisorctl update |
@echo off | |
set dbUser=root | |
set dbPassword=password | |
set backupDir="C:\Documents and Settings\user\Desktop\backup\mysql" | |
set mysqldump="C:\Program Files\MySQL\MySQL Workbench 5.2 CE\mysqldump.exe" | |
set mysqlDataDir="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data" | |
set zip="C:\Program Files\7-Zip\7z.exe" | |
:: get date |