Skip to content

Instantly share code, notes, and snippets.

View pi0's full-sized avatar

Pooya Parsa pi0

View GitHub Profile
@ahbanavi
ahbanavi / amozeshyar_bypass_igap.user.js
Created February 20, 2021 11:05
Bypass Amozeshyar iGap code
// ==UserScript==
// @name Amozeshyar Bypass iGap
// @version 1
// @description Bypass Amozeshyar iGap code
// @author Yedoost
// @match http://stdn.iau.ac.ir/Student/captchaProcess
// @match http://stdn.iau.ac.ir/Student/manageAccount
// @grant none
// ==/UserScript==
@tbutts
tbutts / tmux-migrate-options.py
Last active February 29, 2024 08:11
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
// https://www.netlify.com/blog/2017/07/18/http/2-server-push-on-netlify/
const debug = require('debug')('nuxt:netlify-http2-server-push');
const path = require('path');
const glob = require('glob');
const fs = require('fs');
module.exports = function module(moduleOptions) {
// This module is only enabled on production builds
if (this.options.dev) {
@ceejbot
ceejbot / esm_in_node_proposal.md
Last active July 17, 2023 02:45
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

@jniltinho
jniltinho / install_pagespeed_nginx.sh
Last active June 26, 2023 19:41
How to Install Nginx and Google PageSpeed on Debian/Ubuntu
#!/bin/bash
## Install PageSpeed on Debian 8/9 and Ubuntu 16.04 64Bits
## https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-16-04/
## http://nginx.org/en/linux_packages.html
## https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
## https://developers.google.com/speed/pagespeed/module/
## Debian ISO: https://cdimage.debian.org/cdimage/archive/8.9.0/amd64/iso-cd/
## No Link abaixo tem o pacote do Nginx para o Debian 8 64Bits
## https://github.com/jniltinho/ispconfig/tree/master/packages/debian/jessie
## Run as root (sudo su)
  • The benchmarks used by Marko, with one benchmark containing only a single component with ~50 lines of code, and the other 3 components with one of them fully static markup, are typical micro-benchmarks created to the advantage of certain implementation details. They are too isolated and too trivial to justify across-the-board performance claims.

  • For client-side performance I recommend using the 3rd party js-framework-benchmark as a more neutral reference; the benchmark tests a much bigger workload and covering a much more comprehensive performance scenarios. According to the data from the latest round Vue actually outperforms Marko. That said, even this benchmark doesn't reflect real world performance where much more overhead comes from big component trees.

  • Vue has significantly improved SSR performance for

// $ yarn add request request-promise
// $ node count userA userB
const request = require('request-promise')
const get = resource => request({
url: /^https/.test(resource) ? resource : `https://api.github.com/${resource}`,
headers: {
'User-Agent': 'GitHub Contrib Counter',
'Authorization': 'token YOUR_PERSONAL_ACCESS_TOKEN'
@pi0
pi0 / colors
Last active August 4, 2022 17:35
Super Simple Node.js String Colors Support
This snippets add super Simple Node.js String Colors Support.
See here:
http://stackoverflow.com/questions/32474241/node-js-terminal-color
http://stackoverflow.com/questions/9781218/how-to-change-node-jss-console-font-color
@eloypnd
eloypnd / dnsmasq_setup_osx.md
Last active March 23, 2024 00:25
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
@manekinekko
manekinekko / regex-es6-imports.js
Last active February 1, 2024 16:05
A regular Expression to parse ECMAScript6 import syntax
let regex = `import
(?:
["'\s]*
([\w*{}\n, ]+)
from\s*
)?
["'\s]*
([@\w/_-]+)
["'\s]*
;?