Skip to content

Instantly share code, notes, and snippets.

@jackyq2015
jackyq2015 / redux-performance-mark.js
Created December 14, 2019 01:02 — forked from clarkbw/redux-performance-mark.js
A User Timing middleware for redux to create performance markers for dispatched actions
const timing = store => next => action => {
performance.mark(`${action.type}_start`);
let result = next(action);
performance.mark(`${action.type}_end`);
performance.measure(
`${action.type}`,
`${action.type}_start`,
`${action.type}_end`
);
return result;
@jackyq2015
jackyq2015 / .bashrc
Created November 21, 2019 21:05 — forked from miracle2k/.bashrc
Convert an existing docker container into a "docker run" command line
# Convert an existing docker container into a "docker run" command line.
#
# This is useful when trying to debug containers that have been created
# by orchestration tools.
#
# Install jq: stedolan.github.io/jq/
function format_run() {
cid=$1
@jackyq2015
jackyq2015 / delete_email.py
Created October 29, 2019 23:57 — forked from giovaneliberato/delete_email.py
Python script to delete emails from a specific sender at gmail
#coding: utf-8
import imaplib
import sys
'''
Simple script that delete emails from a given sender
params:
-username: Gmail username
-pw: gmail pw
-label: If you have a label that holds the emails, specify here
@jackyq2015
jackyq2015 / meta-tags.md
Created October 10, 2019 16:32 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags
@jackyq2015
jackyq2015 / index.js
Created August 19, 2018 15:22 — forked from jugyo/index.js
An example to send email with Cloud Pub Sub and Cloud Functions #Rails
const sendEmail = require('./sendEmail').sendEmail;
/**
* Deplooyment:
*
* $ gcloud beta functions deploy sendEmail --trigger-topic sendEmail
*
*/
/**
@jackyq2015
jackyq2015 / necessary_client.html
Created March 11, 2018 23:55 — forked from Scarygami/necessary_client.html
Google Sign-In 2.0 Server-side samples
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Google Sign-in 2.0 - Necessary Client</title>
<script src="https://apis.google.com/js/client:platform.js?onload=clientLoaded" async defer></script>
</head>
<body>
<button id="enable_offline_access">Enable Offline Access</button>
@jackyq2015
jackyq2015 / gist:1629b3889792eeca79a0980bd0738a71
Created March 31, 2017 01:30 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@jackyq2015
jackyq2015 / Monitors.java
Last active February 9, 2017 17:52 — forked from apangin/Monitors.java
Java monitor contention profiler Monitor -- ContendedEnter event
public class Monitors {
public static native void startProfiling(Object monitor);
public static native void stopProfiling();
public static native long getBlockTime();
public static native long getBlockCount();
static {
System.loadLibrary("monitors");
}
@jackyq2015
jackyq2015 / Tree.java
Last active January 15, 2017 16:40 — forked from vnprc/Tree.java
Two search algorithms for a tree, three implementations
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.Stack;
public class Tree {
@jackyq2015
jackyq2015 / bind.c
Created October 22, 2016 03:07 — forked from hc0d3r/bind.c
A simple bind connect backdoor , works in linux and windows, to connect use the netcat. | http://hc0der.blogspot.com
// % cat readme
// Linux and Windows Bind connect Backdoor
// (*c0d3r) -> MMxM
// (*8l06) -> http://hc0der.blogspot.com
// (6r3ttz) -> Cy¢lone
// linux: gcc bind.c -o bind -Wall --> without any error output c;
// windows: gcc.exe "C:/bind.c" -o "C:/bind.exe" -lws2_32 --> dont forget of '-lws2_32'
// % date
// Fri Dec 27 17:18:55 BRST 2013
// % echo d0n7 r3m0v3 7h15 h34d3r m07h3rfuck3r