Skip to content

Instantly share code, notes, and snippets.

@zoutepopcorn
zoutepopcorn / arch-linux-gnome-install
Created September 22, 2019 17:46 — forked from thacoon/arch-linux-gnome-install
Install a minimal gnome setup and some more useful things
# Install Gnome and some other useful thins
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# And based on https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger
# I have just copied commands from https://wiki.archlinux.de/title/Anleitung_f%C3%BCr_Einsteiger#Weitere_notwendige_Dienste
# It's just to have it with one view after doing a [fresh installation](https://gist.github.com/thacoon/05d5a39606ab554455d6713e8a714b2c)
# Some useful services
pacman -S acpid ntp dbus avahi cups cronie
@zoutepopcorn
zoutepopcorn / main.dart
Created August 12, 2018 09:42 — forked from StrykerKKD/main.dart
Web scraping with Dart
import 'package:http/http.dart' as http;
import 'package:html/parser.dart' as parser;
import 'package:html/dom.dart';
main() async {
http.Response response = await http.get('https://news.ycombinator.com/');
Document document = parser.parse(response.body);
document.getElementsByTagName('a').forEach((Element element){
@zoutepopcorn
zoutepopcorn / index.html
Created July 30, 2018 20:16 — forked from arikanmstf/index.html
Service Worker Communication
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"/>
<meta name="google" content="notranslate"/>
<meta name="msapplication-tap-highlight" content="no"/>
<meta http-equiv="cache-control" content="no-store"/>
<meta http-equiv="expires" content="0"/>

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
//npm init -y
//npm install --save puppeteer
//usage: node script.js /path/to/input.html /path/to/output.pdf
//script.js
const puppeteer = require('puppeteer');
(async () => {