Skip to content

Instantly share code, notes, and snippets.

Adonis Kakoulidis varemenos

Block or report user

Report or block varemenos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .hyper.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █
cursorShape: 'BLOCK',
@varemenos
varemenos / _README.md
Last active Jun 25, 2017
Utilizing Array.prototype.reduce to replicate methods in Array's prototype
View _README.md

Reduce.js

This is an exercise and a challenge to see how far can I go with reduce and how many built-in Array methods I can replicate with it.

ToC

  1. concat
  2. every
  3. filter
  4. findIndex
@varemenos
varemenos / 1.fetch2base64.js
Last active Jan 26, 2018
Get an asset via the Fetch API and convert it to a base64 string
View 1.fetch2base64.js
var path = 'http://adonisk.com/img/vlogo.jpg';
fetch(path).then(function (response) {
response.body.getReader().read().then(function(result) {
return btoa(String.fromCharCode.apply(null, result.value));
}).then(function(b64) {
console.log(b64);
});
});
@varemenos
varemenos / myfunc.js
Last active Apr 9, 2018
Sample Javascript module boilerplate
View myfunc.js
(function (root, name, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory;
} else {
root[name] = factory();
}
@varemenos
varemenos / 1.README.md
Last active Sep 15, 2019
Git log in JSON format
View 1.README.md

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
View atom.config
These are the configuration and package-syncing files I'm using for my setup of the Atom Editor
View keybase.md

Keybase proof

I hereby claim:

  • I am varemenos on github.
  • I am adonisk (https://keybase.io/adonisk) on keybase.
  • I have a public key whose fingerprint is A79F C504 FB5A 2EC6 14DD B3D5 45A0 D777 A4D7 C545

To claim this, I am signing this object:

View sublime-scopes.md
File type Scope
ActionScript source.actionscript.2
Apache Conf source.apacheconf
AppleScript source.applescript
ASP source.asp
Batch File source.dosbatch
BibTex source.bibtex
Blade text.html.laravel-blade
BridleNSIS source.nsis.bridle
View logger.js
var spacing = (function (size) {
var result = '';
for (var i = 0; i < size; i++) {
result += '&nbsp;';
}
return result;
})(4);
@varemenos
varemenos / tmtheme.xml
Created Oct 27, 2014
Highlight keys of a JSON file in tmThemes
View tmtheme.xml
<dict>
<key>name</key>
<string>JSON Key</string>
<key>scope</key>
<string>meta.structure.dictionary.json string.quoted.double.json -meta.structure.dictionary.value.json</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#00FF00</string>
</dict>
You can’t perform that action at this time.