Skip to content

Instantly share code, notes, and snippets.


9kopb 9kopb

Block or report user

Report or block 9kopb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pugson / bookmarklet.js
Last active Aug 8, 2019
Open in Notion App (Bookmarklet)
View bookmarklet.js
Kmaschta /
Created Jan 9, 2019
How to generate a self-signed that is valid for your browser (by creating your custom certificate authority)

If you're using self-signed certificate for your web server on development, you might know the browser warning saying that your certificate isn't valid. If like me you had manually added an exception for this certificate error each time it showed up, this gist is for you.

Properly Configure OpenSSL with your DNS aliases

You'll have to create a self-signed certificate with a custom SubjectAltName.

  1. Find your openssl config. find /usr/lib -name openssl.cnf
View testpool.js
// ==UserScript==
// @name Pixel Bot
// @namespace
// @version 3.0
// @description try to take over the world!
// @author Flyink13, igoose
// @match*
// @grant none
// ==/UserScript==
View fiddle.html
Open the console to see the output of this example.
dotcypress / telegram-login.js
Created Feb 24, 2018
Telegram authorization data checker
View telegram-login.js
const { createHash, createHmac } = require('crypto')
function checkSignature (token, { hash, }) {
const secret = createHash('sha256')
const checkString = Object.keys(data)
.map(k => `${k}=${data[k]}`)
View check_authorization.php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
astericky / webpack.config.js
Created Mar 3, 2017
Webpack 2 Config Example
View webpack.config.js
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const VENDOR_LIBS = [
'react', 'react-dom', 'react-router', 'react-redux', 'redux', 'redux-thunk', 'lodash'
module.exports = {
tejaslodaya /
Created Feb 3, 2017
pandas DataFrame apply multiprocessing
import multiprocessing
import pandas as pd
import numpy as np
def _apply_df(args):
df, func, num, kwargs = args
return num, df.apply(func, **kwargs)
def apply_by_multiprocessing(df,func,**kwargs):
9kopb / _.js
Created Jan 1, 2017 — forked from dieseltravis/_.js
javascript bookmarklet to edit cookies on a page
View _.js
(function (w, d) {
var id = (new Date()).valueOf(),
itemTemplate = "<label>"
+ "<code>{name}=</code>"
+ "<input id='Cookie{name}{index}{id}' type='text' value='{value}' style='font-family:monospace;width:50%' />"
+ "</label>"
+ "<input type='button' value='Update' onclick='window.UpdateCookie{id}(\"{name}\", {index});' />"
+ "<input type='button' value='Delete' onclick='window.DeleteCookie{id}(\"{name}\");' />"
+ "<br/>",
formatTemplate = function (name, value, index) {
You can’t perform that action at this time.