Skip to content

Instantly share code, notes, and snippets.

@sindresorhus
sindresorhus / esm-package.md
Last active May 14, 2024 10:07
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.
@swinton
swinton / README.md
Last active May 14, 2024 10:06
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions

image

So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?

Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN, and the GitHub CLI, gh, which is pre-installed on GitHub's hosted Actions runners.

You don't have to configure the git client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT and DESTINATION_BRANCH to suit your needs.

@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox

Describe the network protection controls used by your organization to restrict public access to databases, file servers, and desktop/developer endpoints.

  • Access to the Amazon Aurora database through the network is disabled and standard ports are closed. The database is only accessible through a socket on the server itself.
  • The reverse proxy only serves whitelisted directories that are only from sources controlled by Teecom used (AWS Amplify).
  • API endpoints are password protected (PBKDF2 & SHA512 encryption, salted, and stretched for thousands of rounds).
  • Login credentials are always transmitted securely over SSL.

Describe how your organization individually identifies employees who have access to Amazon Information, and restricts employee access to Amazon information on a need- to-know basis.

  • If all your employees are properly assigned separate users and given only relevant access rights: Access rights are provided to employees based on their role within the company and are progressive, base
#!/usr/bin/python3
import sys
import asyncio
import greenlet
class AsyncIoGreenlet(greenlet.greenlet):
def __init__(self, driver, fn):
greenlet.greenlet.__init__(self, fn, driver)
self.driver = driver
Title : Revisiting Mac OS X Kernel Rootkits
Author : fG!
Date : April 18, 2014
|=----------------------------------------------------------------------------=|
|=----------------=[ Revisiting Mac OS X Kernel Rootkits ]=-------------------=|
|=----------------------------------------------------------------------------=|
|=------------------------=[ fG! <phrack@put.as> ]=---------------------------=|
|=----------------------------------------------------------------------------=|
{"name":"James Edward Peters ","settings":"{\"settings\":\"{\\n \\\"workbench.editorAssociations\\\": {\\n \\\"*.exe\\\": \\\"default\\\"\\n },\\n \\\"diffEditor.ignoreTrimWhitespace\\\": true,\\n \\\"git.confirmSync\\\": false,\\n \\\"diffEditor.renderSideBySide\\\": false,\\n \\\"diffEditor.hideUnchangedRegions.enabled\\\": true\\n}\"}","extensions":"[{\"identifier\":{\"id\":\"vscjava.vscode-java-debug\",\"uuid\":\"61fcd0cf-64d7-4836-8d6b-d55f4fb83281\"},\"displayName\":\"Debugger for Java\"},{\"identifier\":{\"id\":\"xdebug.php-debug\",\"uuid\":\"044b4b31-2969-4af3-895d-855433b8b46d\"},\"displayName\":\"PHP Debug\"}]","globalState":"{\"storage\":{\"workbench.panel.markers.hidden\":\"[{\\\"id\\\":\\\"workbench.panel.markers.view\\\",\\\"isHidden\\\":false}]\",\"workbench.panel.output.hidden\":\"[{\\\"id\\\":\\\"workbench.panel.output\\\",\\\"isHidden\\\":false}]\",\"terminal.hidden\":\"[{\\\"id\\\":\\\"terminal\\\",\\\"isHidden\\\":false}]\",\"workbench.explorer.views.state.hidden\"
@1kko
1kko / repo.sh
Last active May 14, 2024 09:58
Bash - performs search of specific directory up to 2 depth and change directory into it
# This script performs search of specific directory up to 2 depth and change directory into it.
# This is helpful for cases like having many repositories and need to cd into it.
# Install
# 1. Install fzf(https://github.com/junegunn/fzf#related-projects). eg: sudo apt install fzf (
# 2. Copy this source and paste into paste into your: nano ~/.bashrc
# 3. Edit the srchDir variable for your environment
# 4. Save and start new session of terminal
# Usage
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
[ subject ]
@ih2502mk
ih2502mk / list.md
Last active May 14, 2024 09:53
Quantopian Lectures Saved