Skip to content

Instantly share code, notes, and snippets.

@wavezhang
wavezhang / java_download.sh
Last active April 23, 2024 01:53
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
anonymous
anonymous / GAME_MASTER_POKEMON_v0_2.tsv
Created July 16, 2016 19:26
Pokemon from GAME_MASTER protobuf file v0.2 in a .tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 27 columns, instead of 12. in line 2.
PkMn BaseStamina BaseAttack BaseDefense Type1 Type2 BaseCaptureRate BaseFleeRate CollisionRadiusM CollisionHeightM CollisionHeadRadiusM MovementType MovementTimerS JumpTimeS AttackTimerS QuickMoves CinematicMoves AnimTime Evolution EvolutionPips PokemonClass PokedexHeightM PokedexWeightKg HeightStdDev WeightStdDev FamilyId CandyToEvolve
1 90 126 126 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.1599999964237213 0.10000000149011612 0.3815000057220459 0.6539999842643738 0.27250000834465027 HoloPokemonMovementType.POKEMON_ENC_MOVEMENT_JUMP 10.0 1.149999976158142 29.0 d601dd01 5a3b76 6d56d53fdaac2a3f6d56d53f93a9ea3f0000000036ab0a403333b33fbfbbbb3f 02 HoloPokemonClass.POKEMON_CLASS_NORMAL 1 0.699999988079071 6.900000095367432 0.08749999850988388 0.862500011920929 HoloPokemonFamilyId.V0001_FAMILY_BULBASAUR 25
2 120 156 158 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.07999999821186066 0.07000000029802322 0.3187499940395355 0.637499988079071 0.2549999952316284 H
@straker
straker / README.md
Last active April 16, 2024 08:49
Basic Tetris HTML and JavaScript Game

Basic Tetris HTML and JavaScript Game

This is a basic implementation of the game Tetris, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

@PizzaBrandon
PizzaBrandon / jquery.waituntilexists.js
Last active August 24, 2023 14:23 — forked from buu700/jquery.waituntilexists.js
Updated waitUntilExists plugin
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@IMcPwn
IMcPwn / delete-all-messages.js
Last active July 12, 2023 19:41 — forked from niahoo/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Click "Copy ID" and paste that instead of LAST_MESSAGE_ID.
// Copy / paste the below script into the JavaScript console.
// If you're in a DM you will receive a 403 error for every message the other user sent (you don't have permission to delete their messages).
var before = 'LAST_MESSAGE_ID';
clearMessages = function(){
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
@cybercase
cybercase / product.js
Last active February 10, 2023 10:59
Python-like itertools.product function in javascript
function product() {
var args = Array.prototype.slice.call(arguments); // makes array from arguments
return args.reduce(function tl (accumulator, value) {
var tmp = [];
accumulator.forEach(function (a0) {
value.forEach(function (a1) {
tmp.push(a0.concat(a1));
});
});
return tmp;
@johnhunter
johnhunter / jQuery.reduce.js
Created October 27, 2010 19:48
jQuery.reduce - a jQuery plugin for functional programming
/*
jQuery.reduce - a jQuery plugin for functional programming
@author John Hunter
created 2010-09-17
use: $.reduce(arr, fnReduce, valueInitial);
fnReduce is called with arguments: [valueInitial, value, i, arr]
reduce will never be jQuery core - its not prototype :p (http://dev.jquery.com/ticket/1886)
*/
(function ($) {
@NV
NV / README.md
Created April 12, 2010 11:28
JavaScript Timer class. setInterval pool. Much more powerful than prototype.js's periodicalExecuter

JavaScript Timer

Run 5 times, with one second delay between calls

t1 = new Timer(500, function(){
  console.log(this.count);
  if (this.count >= 5) {
    this.stop();
  }

});