Skip to content

Instantly share code, notes, and snippets.

Avatar

Szymon Korytnicki skorytnicki

View GitHub Profile
@skorytnicki
skorytnicki / sendmail.js
Last active Sep 22, 2016
EmailLabs Node.js integration
View sendmail.js
const request = require('request');
const smtp = '1.yoursmtp.smtp';
const appkey = 'yourappkey';
const secret = 'yoursecret';
const options = {
method: 'POST',
url: 'https://api.emaillabs.net.pl/api/new_sendmail',
form: {
@skorytnicki
skorytnicki / countSyllables.js
Created Jul 18, 2016
Approximate the number of syllabes in the string
View countSyllables.js
// coursera NLP lesson 02.04
// approximating number of syllables in a string
function countSyllables(s) {
'use strict';
var k = 0;
if (s.length < 1) return k;
s = s.toLowerCase();
@skorytnicki
skorytnicki / invite.js
Last active Feb 18, 2017
Inviting all facebook friends to like your fanpage
View invite.js
// Open the friends' list and paste the script to the browser's console
// Tested in Chrome
var buttons = document.querySelectorAll('li.fbProfileBrowserListItem .uiButton');
for (var x = 0; x<buttons.length; x++) {
(function(num){
buttons[num].click();
}(x))
}
@skorytnicki
skorytnicki / makeMessengerLovelyCat.js
Created Mar 9, 2016
Change friends' avatar on messenger
View makeMessengerLovelyCat.js
var x = document.querySelectorAll('[alt="FRIEND NAME"]');for(var y = 0; y < x.length; y++) {x[y].setAttribute('src','http://www.szara-przystan.pl/wp-content/uploads/2014/02/dachowiec_kot_4.jpg');}