Skip to content

Instantly share code, notes, and snippets.

Alexandru Vlăduţu alessioalex

Block or report user

Report or block alessioalex

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 index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<pre id='display-panel'></pre>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h3>Check your console to see the output, press F12 and go to the console tab.</h3>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="example1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h3>Check your console to see the output, press F12 and go to the console tab.</h3>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="example1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h3>Check your console to see the output, press F12 and go to the console tab.</h3>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
View swarmchat.html
<html>
<head>
<style>
.lines { height: 20em; }
input[type="text"] {
width: 500px;
padding: 5px;
}
</style>
@alessioalex
alessioalex / sjcl-example.js
Created Jul 11, 2018 — forked from yetanotherchris/sjcl-example.js
Stanford Javascript Crypto Library basic AES example
View sjcl-example.js
// Basic AES example using the defaults.
// https://github.com/bitwiseshiftleft/sjcl
var password = "password";
var text = "my secret text";
var parameters = { "iter" : 1000 };
var rp = {};
var cipherTextJson = {};
sjcl.misc.cachedPbkdf2(password, parameters);
@alessioalex
alessioalex / server.js
Last active May 27, 2016 — forked from koistya/server.js
Async node-postgres sample code
View server.js
/*
import express from 'express';
import db from './core/db';
const app = express();
const port = process.env.PORT || 3000;
app.get('/visits', (req, res, next) => {
db.connect(async ({ query } => {
await query('INSERT INTO visit (date) VALUES ($1)', new Date());
@alessioalex
alessioalex / System Design.md
Created Apr 18, 2016 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
View fs-read.js
var fs = require('fs');
var CHUNK_SIZE = 4 * 1024;
var buffer = new Buffer(CHUNK_SIZE);
var filePath = __dirname + '/public/index.html';
// fs.open(filePath, 'r', function(err, fd) {
// if (err) throw err;
//
// fs.read(fd, buffer, 0, CHUNK_SIZE, null, function(err, nread) {
// if (err) throw err;
You can’t perform that action at this time.