Skip to content

Instantly share code, notes, and snippets.

Avatar

Aida Drogan droganaida

View GitHub Profile
View css-read-more-less-button.html
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>CSS Read more / Read less button | demo by #BlondieCode</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/* Common styles */
html, body {
min-height: 100vh;
@droganaida
droganaida / svg-animation-demo.html
Created Mar 19, 2020
Some cool SVG animations (move, rotate, opacity, text on path). No JavaScript.
View svg-animation-demo.html
<html>
<head>
<title>SVG animation demo dy #BlondieCode</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body{
min-height: 100vh;
margin: 0;
padding: 0;
@droganaida
droganaida / lazy-loading.html
Created Jan 23, 2020
Intersection Observer + custom lazy loading demo
View lazy-loading.html
<html>
<head>
<title>Lazy loading by #Blondiecode</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Arial, "Helvetica Neue", Helvetica, serif;
}
footer {
@droganaida
droganaida / rainbowButtons.html
Last active Sep 17, 2019
Rainbow gradient for the group of buttons depending on position
View rainbowButtons.html
<html>
<head>
<title>Common CSS background on button group by #BlondieCode</title>
<style>
body {
display: flex;
flex-direction: column;
}
footer {
text-align: center;
@droganaida
droganaida / bluebird-test.js
Last active Mar 18, 2020
Asynchronous vs synchronous vs synchronous asynchronous loop with delay or without
View bluebird-test.js
const request = require("request");
const Promise = require('bluebird');
const getUrl = Promise.promisifyAll(request);
let requestsSent = 0;
let requestsSuccess = 0;
//======================= jsonGet Function =======================//
@droganaida
droganaida / rightClickMenu.html
Created Feb 12, 2019
Custom context (right-click) menu on the web page by #BlondieCode
View rightClickMenu.html
<!DOCTYPE html>
<html lang="ru" dir="ltr">
<head>
<title>#BlondieCode Правый мышеклик</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body {
width: 100%;
height: 100%;
@droganaida
droganaida / clusterDemo.js
Last active Jun 12, 2020
Node.js Cluster demo. Fork(), cluster events, lifecycle of workers, messages between workers and master.
View clusterDemo.js
const cluster = require('cluster');
const http = require('http');
const port = 6006;
const requestHandler = (request, response) => {
response.writeHead(200);
if (request.url === '/error') {
// uncaught exception
@droganaida
droganaida / childProcess.js
Last active Jan 28, 2019
Node.js child_process demo. Test for exec(), execFile() and spawn().
View childProcess.js
const childProcess = require('child_process');
function execProcess(command) {
childProcess.exec(command, function(error, stdout, stderr) {
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
@droganaida
droganaida / admitad-auth-and-program-list.js
Created Jul 24, 2018
List of affiliate programs admitad.com API (Basic HTTP and Bearer Token Authentication Node.js )
View admitad-auth-and-program-list.js
//==============================================================//
//********* List of affiliate programs admitad.com API *********//
// https://developers.admitad.com/
//==============================================================//
var https = require('https');
var host = 'api.admitad.com';
var port = 443;
var config = require('./config'); // your config here
var clientId = config.yourClientId; // client id
@droganaida
droganaida / git-commands.txt
Created Apr 5, 2018
Most useful git commands
View git-commands.txt
# undo git pull
git reset --hard ORIG_HEAD
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"