Skip to content

Instantly share code, notes, and snippets.

View J2TEAM's full-sized avatar
💭
I may be slow to respond.

JUNO_OKYO J2TEAM

💭
I may be slow to respond.
View GitHub Profile
@J2TEAM
J2TEAM / get-hdo-subtitle.js
Created July 23, 2017 19:25
Tự động lấy link tải phụ đề từ phim đang xem trên hdonline.vn
/* Developed by Juno_okyo */
(function(j2team){var b="";jwplayer().getCaptionsList().map(function(a){a.id.includes("vsub.php")&&(console.log(a.label,a.id),b+=a.id+"\n");copy(b)})})("J2TEAM");
@J2TEAM
J2TEAM / signed_request.js
Created June 8, 2017 05:07 — forked from sorenlouv/signed_request.js
Parse signed request from Facebook cookie, and exchange code to access token
var request = require('request-promise');
var crypto = require('crypto');
var config = {...};
function getAccessToken(cookies) {
var cookieName = 'fbsr_' + config.client_id;
var signedRequest = cookies[cookieName];
var code = getCode(signedRequest);
return exchangeCodeForAccessToken(code);
};
@J2TEAM
J2TEAM / TrueColour.md
Created March 15, 2017 20:42 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@J2TEAM
J2TEAM / tinyurl.php
Last active July 12, 2018 06:28
URL Shortener Plugin for your chatbot (build with Chatfuel)
<?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor/autoload.php';
use juno_okyo\Chatfuel;
function shortUrl($url) {
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => 'http://tinyurl.com/api-create.php?url=' . urlencode($url),
@J2TEAM
J2TEAM / random-number.php
Created March 11, 2017 09:14
Simple plugin to generate random number for your chatbot (build with Chatfuel)
<?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor/autoload.php';
use juno_okyo\Chatfuel;
if (isset($_GET['min'], $_GET['max']) && ! empty($_GET['min']) && ! empty($_GET['max'])) {
$cf = new Chatfuel(TRUE);
$min = intval($_GET['min']);
$max = intval($_GET['max']);
// From: https://finnwea.com/blog/stealing-passwords-from-mcdonalds-users
var originalDocumentTitle = document.title;
$(window).focus(function(){document.title = originalDocumentTitle});
$(window).blur(function(){document.title = "Are you still there?"});
@J2TEAM
J2TEAM / attack.md
Created January 11, 2017 12:44 — forked from timruffles/attack.md
Chrome/Gmail attack received 11/03/2016. Not sure if the Chrome meta refresh + data:text,html technique is novel.

The following attack will display a "you've been signed out" page for GMail, and attempt to steal your account credentials.

DO NOT PUT ANY ACCOUNT CREDENTIALS INTO ANY TABS CREATED AFTER VISITING THESE LINKS :)

I received an email in my GMail inbox with a fake attachment image, styled to look like the real GMail attachment UI:

fake

This linked to a page that ended up displaying a fake "you've been signed out" link, via the data:text/html... URL feature of Chrome:

@J2TEAM
J2TEAM / reclaimWindows10.ps1
Created January 7, 2017 19:17 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@J2TEAM
J2TEAM / timeline.css
Created September 21, 2016 17:10 — forked from LibertysYarn/timeline.css
Responsive Timeline - Bootstrap 3
.timeline {
list-style: none;
padding: 20px 0 20px;
position: relative;
}
.timeline:before {
top: 0;
bottom: 0;
position: absolute;
@J2TEAM
J2TEAM / active.md
Created September 18, 2016 14:30 — forked from paulmillr/active.md
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Fri, 19 Jun 2015 15:17:38 GMT till Sun, 19 Jun 2016 15:17:38 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 635)