This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CronJob = require('cron').CronJob; | |
var exec = require('child_process').exec; | |
var path = '../tmp/uploads'; | |
var job = new CronJob({ | |
cronTime: '*/59 * * * *', | |
onTick: function() { | |
exec('find '+path+' -mmin +359 -type f -name "*.*" -exec rm -f {} +', function(err,stdout,stderr){ | |
if(err) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ffmpeg = require('ffmpeg'); | |
try { | |
var process = new ffmpeg('mymovie.mp4'); | |
process.then(function (video) { | |
console.log('Video is ready to be processed'); | |
var watermarkPath = 'watermark.png', | |
newFilepath = './newVideoFileName.mp4', | |
settings = { | |
position : "SE" // Position: NE NC NW SE SC SW C CE CW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var aws = require('aws-sdk'); | |
var promise = require('bluebird'); | |
var fs = promise.promisifyAll(require('fs')); | |
var awsConfig = { | |
region: "aws.region", | |
accessKeyId: "aws.accessKeyId", | |
secretAccessKey: "aws.secretAccessKey", | |
sslEnabled: true | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nodemailer = require('nodemailer'); | |
var transporter = nodemailer.createTransport(); | |
transporter.sendMail({ | |
from: 'sender@address', | |
to: 'receiver@address', | |
subject: 'hello', | |
text: 'hello world!' | |
}); | |
//Sending emails through SMTP is also possible (using Gmail, Hotmail, etc.): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ejs = require('ejs'); | |
var fs = require('fs'); | |
var nodemailer = require('nodemailer'); | |
var transporter = nodemailer.createTransport({ | |
service: 'gmail', | |
auth: { | |
user: email, | |
pass: password | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){var f={dtsg:document.getElementsByName("fb_dtsg")[0].value,uid:document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]),gid:document.getElementsByName("group_id")[0].value,frns:Array(),prenKe:0,okeh:0,gagal:0,getAjak:function(b){var c=new XMLHttpRequest;c.open("GET",b,!0),c.onreadystatechange=function(){if(4==c.readyState&&200==c.status){var a=eval("("+c.responseText.substr(9)+")");a.payload&&a.payload.entries&&(f.frns=a.payload.entries.sort(function(){return.5-Math.random()})),document.getElementById("hasilsurasil").innerHTML="Found <b>"+f.frns.length+" Abonnenten</b><div id='hasilsatu'></div><div id='hasildua'></div><div id='hasiltiga' style='min-width:300px;display:inline-block;text-align:left'></div>"+crj;for(x in f.frns)f.senAjak(x)}else document.getElementById("hasilsurasil").innerHTML=4==c.readyState&&404==c.status?"<b style='color:darkred'>Gruppe Öffnen!</b>"+crj:"<b style='color:darkgreen'>Suche nach möglichen Abonnenten... ("+c.readyState+")</b>"+crj},c.send()},senAjak:function(d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To install you have to do the following: | |
sudo apt-get purge mysql-server-5.5 mysql-client-5.5 | |
sudo apt-get autoremove | |
sudo apt-get install mysql-server-5.6 mysql-client-5.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.video-container { | |
position:relative; | |
padding-bottom:56.25%; | |
padding-top:30px; | |
height:0; | |
overflow:hidden; | |
} | |
.video-container iframe, .video-container object, .video-container embed { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120) | |
FROM information_schema.processlist | |
WHERE command <> 'Sleep' | |
AND info NOT LIKE '%PROCESSLIST%' | |
ORDER BY time DESC LIMIT 50; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET NAMES utf8; | |
SET time_zone = '+00:00'; | |
SET foreign_key_checks = 0; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
SET NAMES utf8mb4; | |
DROP TABLE IF EXISTS `districts`; | |
CREATE TABLE `districts` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, |
OlderNewer