Skip to content

Instantly share code, notes, and snippets.

@A-312
A-312 / ldjam-filter-ideas.js
Created April 27, 2020 13:45
Remove duplicate ideas
const fs = require('fs')
// https://api.ldjam.com/vx/theme/idea/vote/get/176557
const themes = JSON.parse(fs.readFileSync(__dirname + '/list.json')).ideas
const keys = Object.keys(themes)
console.log('count', keys.length, '(before)')
const uniqs = {}
// ==UserScript==
// @name Ludumdare - displays HTML5 games
// @namespace ldjam-html5-games
// @version 4
// @homepageURL https://ldjam.com/events/ludum-dare/46/rescue-turtles-1/displays-border-if-game-is-html5-or-not
// @updateURL https://gist.github.com/A-312/de155f4753463dce1d8910ad859f944f/raw/ldjam-html5-games.user.js
// @downloadURL https://gist.github.com/A-312/de155f4753463dce1d8910ad859f944f/raw/ldjam-html5-games.user.js
// @supportURL https://gist.github.com/A-312/de155f4753463dce1d8910ad859f944f
// @description Displays HTML5 games
// @author A-312
@A-312
A-312 / ..git-pr.md
Created April 13, 2020 17:50 — forked from gnarf/..git-pr.md
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@A-312
A-312 / textarea-api-grammalecte.html
Created April 7, 2020 08:42
Test de l'API de grammalecte
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<style>
label, textarea { font-size: 1rem; letter-spacing: 1px; }
textarea { padding: 10px; line-height: 1.5; border-radius: 5px; border: 1px solid #ccc; box-shadow: 1px 1px 1px #999; }
textarea, button, label { display: block; margin-bottom: 10px; }
</style>
</head>
<body>
<?php
namespace Core\Bundle\Twig\TwigExtension;
use Core\Kernel\Kernel;
class assetExtension extends \Twig_Extension {
public function getFunctions() {
return array(
new \Twig_SimpleFunction("asset", array($this, "asset"))
);
@A-312
A-312 / add_thumbnail.js
Last active January 1, 2019 09:18
Ajoute les miniatures pour un dossier remplit d'image (à utiliser dans la console du navigateur).
Object.values(document.getElementsByClassName("js-navigation-open")).forEach((a) => a.innerHTML += `<img src="${(a.href||"").replace("github.com", "raw.githubusercontent.com").replace("blob/", "")}">`);
@A-312
A-312 / citerlasection.user.js
Last active July 25, 2018 10:41
Userscript pour citer la selection sur Zeste de savoir - Version 1.41
// ==UserScript==
// @name ZDS - Citer la selection
// @description Citer la selection.
// @namespace zds_citer_selection_a-312
// @author A-312
// @version 1.41
// @include https://zestedesavoir.com/forums/sujet/*
// @include https://zestedesavoir.com/tutoriels/*
// @include https://zestedesavoir.com/billets/*
// @require http://code.jquery.com/jquery-3.3.1.min.js