Skip to content

Instantly share code, notes, and snippets.

Avatar
🌐
Try your best to be right, but don't worry when you are wrong.

Christos Paschalidis paschalidi

🌐
Try your best to be right, but don't worry when you are wrong.
View GitHub Profile
@paschalidi
paschalidi / README-Template.md
Created Nov 7, 2018 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

View kaybase.md

Keybase proof

I hereby claim:

  • I am paschalidi on github.
  • I am paschalidi (https://keybase.io/paschalidi) on keybase.
  • I have a public key ASAErA48SyiVK1eTCk7wtLRETxr_TVwTXAdYoUoMhPOEMgo

To claim this, I am signing this object:

@paschalidi
paschalidi / arrayBufferToString.js
Created Jan 24, 2019 — forked from skratchdot/arrayBufferToString.js
Array Buffer -> String and String -> ArrayBuffer conversions in javascript
View arrayBufferToString.js
// source: http://stackoverflow.com/a/11058858
function ab2str(buf) {
return String.fromCharCode.apply(null, new Uint16Array(buf));
}
View Good-CONTRIBUTING.md-template.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@paschalidi
paschalidi / webcryptoapi.html
Created Mar 21, 2019 — forked from deiu/webcryptoapi.html
Web Crypto API example: RSA keygen & export & import & sign & verify & encrypt & decrypt
View webcryptoapi.html
<!-- MIT License -->
<html>
<head>
<script>
function generateKey(alg, scope) {
return new Promise(function(resolve) {
var genkey = crypto.subtle.generateKey(alg, true, scope)
genkey.then(function (pair) {
resolve(pair)
})
@paschalidi
paschalidi / ladder.md
Created Mar 29, 2019 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@paschalidi
paschalidi / flatten.test.ts
Last active Oct 18, 2019
A simple function that recursively flattens a given `array`
View flatten.test.ts
import { flatten } from "./flatten";
describe("flatten method", function() {
it("should flatten deeply arrays", function() {
const array = [1, [2, [3, [4]], 5]];
const flatArray = flatten(array);
const expected = [1, 2, 3, 4, 5];
expect(flatArray).toEqual(expected);
});
@paschalidi
paschalidi / DOM question
Created Dec 13, 2019
A simple Dom interview question
View DOM question
<html>
<head>
<title>DOM!!!</title>
</head>
<body>
<h1 id="one">Welcome</h1>
<p>This is the welcome message.</p>
<h2>Technology</h2>
<p>This is the technology section.</p>
<script type="text/javascript">
View new Keyword question
function Person(name) {
this.name = name;
}
var person = Person('John');
console.log(person);
console.log(person.name);
var person = new Person('John');
console.log(person);
View var let const - function
function foo() {
// All variables are accessible within functions.
var bar = 'bar';
let baz = 'baz';
const qux = 'qux';
console.log(bar);
console.log(baz);
console.log(qux);
}