Skip to content

Instantly share code, notes, and snippets.

Tiny Giant Tiny-Giant

  • Ladysmith, BC, Canada
Block or report user

Report or block Tiny-Giant

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
View Programming Problems.md

How to create a programming problem

Programming problems must be both well defined and reasonably scoped.

  • Well defined programming problems are clear and unambiguous. They must not be open to interpretation and all important variables(?) must be defined and accounted for.

    // Examples of poorly defined and well defined programming problems

  • Reasonably scoped programming problems are distilled to a specific problem, without being overly specific. Trying to cover too much ground and including too many details both reduce the usefulness of the question and the likeliness of receiving an answer, and can lead to question closure.

View Closure related events for How to make a great R reproducible example.md
View gist:085436cedae02b0b9c2ee80b59ca28ad
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
View lazy_mandelbrot.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
View intercept and manipulate ajax.js
const XHR = XMLHttpRequest;
unsafeWindow.XMLHttpRequest = new Proxy(XHR, {
construct: (target, args) => {
const listeners = [{
regex: /close\/add/,
get: data => {
if(data.property === 'responseText') {
console.log(xhr.responseText);
const obj = JSON.parse(xhr.responseText);
View jQuery is bad mmkay.md

#BAD!

$('.link').on('click', _ => $('.link').attr('href', $('.link').attr('href').replace(/#.+/,'')));

#GOOD!

const link = $('.link');
link.on('click', _ => link.attr('href', link.attr('href').replace(/#.+/, ''));
@Tiny-Giant
Tiny-Giant / Tic-Tac-Toe.js
Last active Mar 12, 2018
A prompt/confirm tic-tac-toe game using ES6
View Tic-Tac-Toe.js
(() => {
"use strict";
const game = () => {
let done;
const solutions = [
[ 0, 1, 2 ], [ 0, 3, 6 ], [ 0, 4, 8 ],
[ 1, 4, 7 ], [ 2, 4, 6 ], [ 2, 5, 8 ],
[ 3, 4, 5 ], [ 6, 7, 8 ]
];
View deepmerge.js
const deepmerge = (h, ...args) => {
const gettype = e => Object.prototype.toString.call(e).replace(/.*\b(\w+)./, '$1');
const o = {};
Object.assign(h, {
"Array": (a, b) => [...a, ...b],
"Object": (a, b) => deepmerge(h, a, b),
"Set": (a, b) => new Set([...a, ...b]),
"Map": (a, b) => {
View RequestGenerator.user.js
// ==UserScript==
// @name CV Request Generator
// @namespace https://github.com/SO-Close-Vote-Reviewers/
// @version 2.0.0.2
// @description This script generates formatted close vote requests and sends them to a specified chat room
// @author @TinyGiant
// @include /^https?:\/\/(?!chat)\w*.?(stackexchange.com|stackoverflow.com|serverfault.com|superuser.com|askubuntu.com|stackapps.com|mathoverflow.net)\/.*/
// @updateURL https://github.com/Tiny-Giant/myuserscripts/raw/master/CVRequestGenerator.user.js
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
View your-answer.md

Did I [do the right thing]?

From your description of the question, (irrelevant, screenshot now in question) yes. "Looks OK" was the correct action. It also probably shouldn't have been closed. (Disclaimer: I can't actually see the question; from your description, it could possibly be off-topic for "typographical error".) (irrelevant, screenshot now in question)

Copying from here:

For example, in Triage, clarify a few things:

  • It is completely okay to both downvote and review "Looks OK" on the same question.
  • "Requires Editing" should only be used if a decent edit could be made by 2K users, not the OP.
You can’t perform that action at this time.