Skip to content

Instantly share code, notes, and snippets.

View kounelios13's full-sized avatar

Manos Kounelakis kounelios13

View GitHub Profile
@kounelios13
kounelios13 / sublime-text-scopes.md
Created May 22, 2016 15:13 — forked from J2TEAM/sublime-text-scopes.md
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@kounelios13
kounelios13 / walksync.js
Last active October 6, 2017 20:19 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
const fs = require('fs');
// List all files in a directory in Node.js recursively in a synchronous fashion
const walkSync = function(dir, filelist,ignoreList) {
if(!dir.endsWith('/')){
dir+='/';
}
const files = fs.readdirSync(dir);
filelist = filelist || [];
ignoreList = ignoreList || [];
files.forEach(function(file) {
@kounelios13
kounelios13 / Contract Killer 3.md
Created February 28, 2018 20:59
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@kounelios13
kounelios13 / gist:c16c6428ff6a6749a77d8d722783b0b4
Last active March 4, 2018 19:26 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var crypto = require('crypto');
const create_string_hash = (data) => crypto.createHash('md5').update(data).digest("hex");
@kounelios13
kounelios13 / BootboxJSCustomWidth
Created August 20, 2018 05:36 — forked from rasmuschristensen/BootboxJSCustomWidth
Changing the width of bootbox dialog
// css
.dialogWide > .modal-dialog {
width: 80% !important;
}
// script
bootbox.dialog({
className: "dialogWide",
title: "Foo",
message: "what to say, go wide",
buttons: {
@kounelios13
kounelios13 / msconvert.js
Created February 15, 2019 08:38 — forked from Erichain/msconvert.js
JavaScript: Convert milliseconds to object with days, hours, minutes, and seconds
function convertMS( milliseconds ) {
var day, hour, minute, seconds;
seconds = Math.floor(milliseconds / 1000);
minute = Math.floor(seconds / 60);
seconds = seconds % 60;
hour = Math.floor(minute / 60);
minute = minute % 60;
day = Math.floor(hour / 24);
hour = hour % 24;
return {
@kounelios13
kounelios13 / index.html
Created January 27, 2021 07:42 — forked from zurfyx/index.html
cache selector (with & w/o jQuery) (http://jsbench.github.io/#3621d3b9b571cc3640fa988b42c5c873) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>cache selector (with & w/o jQuery)</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>