Skip to content

Instantly share code, notes, and snippets.

@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active October 11, 2025 14:25
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@StarDuster
StarDuster / nginx-tls1.3
Last active August 28, 2020 19:02 — forked from moneytoo/gist:ab3f34e4fddc2110675952f8280f49c5
nginx mainline (1.13) with openssl 1.1.1 to support TLSv1.3
# Based on CentOS7 fork of @smartmadsoft: https://gist.github.com/moneytoo/ab3f34e4fddc2110675952f8280f49c5
# "6" for CentOS6 or Amazon Linux, "7" for CentOS7
CENTVER="6"
OPENSSL="openssl-1.1.0-pre5"
NGINX="nginx-1.13.0-1"
#yum clean all
# Install epel packages (required for GeoIP-devel)
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@oldwestaction
oldwestaction / tabbycatswag.json
Last active November 11, 2023 01:52
hack for the tabby cat chrome extension to unlock all the accessories
{"collected":["glasses-1","glasses-2","glasses-3","glasses-4","hat-1","hat-2","hat-3","hat-4","hat-5","hat-6","hat-7","hat-8","toy-1","toy-2","toy-3","toy-4","toy-5","toy-6","toy-7","toy-8"],"active":{"hat":"hat-8","toy":"toy-3","glasses":"glasses-3"},"unseen":[],"shuffle":false}
@andy0130tw
andy0130tw / sticker-convert.py
Created January 31, 2016 20:08
Convert Facebook-downloaded stickers to GIF animations! You need Pillow and an image2gif script to use this. (The latter can be found in my Gist.)
#!/usr/bin/env python3
from os import path, makedirs
from PIL import Image
import image2gif
def splitImage_2x2(image):
w, h = image.size
assert((w % 2, h % 2) == (0, 0))

Generating Authy passwords on other authenticators


Update 04.04.2020: Please take a look at many of the forks of this gist or comments, where people have updated or improved upon the code. I have not needed this in a long time, which is why the original document has not been updated and the code probably does not work. Stay secure and only copy and paste code that you trust.

There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, thro

@Pysis868
Pysis868 / grub.cfg
Last active January 29, 2025 01:56
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-bo…
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub2/grub.cfg
# or
# /boot/grub/grub.cfg
# Mostly only 'legacy' CSM/BIOS boot methods currently.
# Unable to boot loop entries with Secure Boot
# Notes:
# Description:
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
@kitplummer
kitplummer / openstack.groovy
Created June 12, 2013 22:01
Simple Groovy script working with OpenStack's Keystone and Compute(Nova) APIs.
@Grab(group="org.codehaus.groovy.modules.http-builder", module="http-builder", version='0.5.2')
import groovyx.net.http.RESTClient
import groovy.util.slurpersupport.GPathResult
import groovy.json.*
keystone = new RESTClient( 'http://10.0.1.49:5000/v2.0/' )
resp = keystone.post( path : 'tokens',
body : [auth:[passwordCredentials:[username: "admin", password:"stack"], tenantId: "2ba2d60c5e8d4d1b86549d988131fe48"]],
@willurd
willurd / web-servers.md
Last active October 26, 2025 20:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@i-e-b
i-e-b / A_Profile_BJSS.ps1
Last active April 23, 2025 14:15
My sample Powershell profile script
Set-PSReadlineOption -BellStyle None
# Clone `https://github.com/dahlbyk/posh-git.git` to C:\Gits
Import-Module 'C:\Gits\posh-git\src\posh-git.psd1'
set-executionpolicy Unrestricted process
$baseDir = Split-Path -parent $MyInvocation.MyCommand.Definition
#. "$baseDir\hand.ps1"
# General actions
function edit ($file) { & "${env:ProgramFiles(x86)}\Notepad++\notepad++.exe" $file }