Skip to content

Instantly share code, notes, and snippets.

View tvtamas's full-sized avatar

Tamás Török-Vistai tvtamas

  • Codespring
  • Cluj-Napoca, RO
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active June 16, 2024 19:05
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
///// TODO : Replace <<LAN_INTERFACE>> with internal bridge or lan interface, replace <<<PPPOE_DIGI_INTERFACE>>> with the pppoe-digi interface
/ipv6 nd
set [ find default=yes ] disabled=yes
add advertise-dns=yes interface=<<LAN_INTERFACE>>
/ipv6 dhcp-client
add add-default-route=yes interface=<<<PPPOE_DIGI_INTERFACE>>> pool-name=pool6 request=address,prefix script=":del\
ay 5s;\
\n/ipv6 address remove [find advertise=yes]\
import requests
from requests.auth import HTTPBasicAuth
import re
from StringIO import StringIO
JIRA_URL = 'https://your-jira-url.tld/'
JIRA_ACCOUNT = ('jira-username', 'jira-password')
# the JIRA project ID (short)
JIRA_PROJECT = 'PRO'
GITLAB_URL = 'http://your-gitlab-url.tld/'
@mpilone
mpilone / VaadinSessionManager.java
Created July 31, 2013 15:26
Vaadin, Shiro, and Push. Support classes to integrate Shiro with Vaadin 7.1+ push support. See http://mikepilone.blogspot.com/ for more information.
package org.prss.mpilone.util.shiro;
import java.util.UUID;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionException;
import org.apache.shiro.session.mgt.*;
import com.vaadin.server.VaadinSession;