Skip to content

Instantly share code, notes, and snippets.

View SwadhInz's full-sized avatar
🎯
Focusing

Ridwanul Jauad SwadhIn SwadhInz

🎯
Focusing
View GitHub Profile
@emilioriosvz
emilioriosvz / mongoose-connection.js
Created April 4, 2018 09:40
connect with mongoose using async/await
const mongoose = require('mongoose')
mongoose.Promise = Promise
mongoose.connection.on('connected', () => {
console.log('Connection Established')
})
mongoose.connection.on('reconnected', () => {
console.log('Connection Reestablished')

Modern Google Loader in Pure CSS ('-' * 32) Modern Google spinning loader animating through four colors.

A Pen by jczimm on CodePen.

License.

#include <iostream>
#include <sstream>
#include <queue>
using namespace std;
#define Inf 99999999
int main()
{
ios::sync_with_stdio(false);
int n, k;
@clarkdave
clarkdave / parseAndModifyHtml.js
Created May 6, 2011 21:24
Using node.js to parse HTML with jsdom and modify it with jQuery
/**
* npm install jsdom
* npm install jquery
*/
var html = "<!doctype html><html><body><h1>Hello world!</h1></body></html>";
/* parse the html and create a dom window */
var window = require('jsdom').jsdom(html, null, {
// standard options: disable loading other assets