Skip to content

Instantly share code, notes, and snippets.

View DreadKnight's full-sized avatar
🦇
Working on Ancient Beast v0.5, woot!

Dread Knight DreadKnight

🦇
Working on Ancient Beast v0.5, woot!
View GitHub Profile
@incompl
incompl / game.js
Last active December 10, 2015 11:39
Code for my Box2d screencast on Bocoup.com
var canvasElem = document.getElementById("game");
var world = boxbox.createWorld(canvasElem);
world.createEntity({
name: "player",
shape: "circle",
radius: 1,
image: "pig.png",
imageStretchToFit: true,
density: 4,
@luser
luser / gamepad-buttons.js
Created December 6, 2013 20:45
Gamepad API button handling
function listButtons(gamepad) {
for (var i = 0; i < gamepad.buttons.length; i++) {
var b = gamepad.buttons[i];
var pressed, val;
if (typeof(b) == "object") {
pressed = b.pressed;
val = b.value;
} else {
val = b;
pressed = b == 1.0;
@jamesflorentino
jamesflorentino / convert.sh
Last active September 20, 2016 10:54
Makefile for creating favicons from 16x16 up to 128x128.
convert favicon.png -resize 16x16 favicon.ico;
convert favicon.png -resize 16x16 favicon_16x16.png;
convert favicon.png -resize 32x32 favicon_32x32.png;
convert favicon.png -resize 64x64 favicon_64x64.png;
convert favicon.png -resize 128x128 favicon_128x128.png;
echo "conversion complete";
//Copyright 2021 MineMintTeam | Samuel Rivera
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
//(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
//publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
//subject to the following conditions:
//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// SPDX-License-Identifier: MIT
//Copyright 2021 MineMintTeam | Samuel Rivera
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
//(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
//publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
//subject to the following conditions:
//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@twolfson
twolfson / .gitignore
Last active September 17, 2021 08:23
Scrape all GitHub watchers, stargazers, and followers
node_modules/
fixtures/
output/
config.json
@gr2m
gr2m / account_dreamcode.js
Last active May 7, 2022 08:22
Imagine the typical backend tasks for user authentication would exist right in the browser. How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// sign up
account.signUp('joe@example.com', 'secret');
// sign in
account.signIn('joe@example.com', 'secret');
// sign in via oauth
account.signInWith('twitter');
// sign out
@kvnsmth
kvnsmth / example-subtree-usage.md
Last active March 5, 2023 21:58
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add git@github.com:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@Sebazzz
Sebazzz / Creality-CR-6-Unboxing-guide.md
Last active September 5, 2023 11:30
Creality CR-6 Unboxing & assembly guide

CR-6 post-unboxing checklist

With most of the CR-6 SE issues being due to bad wiring or loose/too tight screws I feel like it is time for a good post-unboxing checklist, to be walked through pre-assembly. Even though I do not have my unit shipped yet, I've seen enough issues and fixes that I can compile this post.

I initially posted this on the independent CR-6 community Facebook group but since not everyone wants to use Facebook (which I totally understand), I will repost it here. I mirrored most of the relevant content of Facebook to imgur.

If you have any feedback or anything that needs to be added, please let me know and I will amend this post!

Note: There are some known issues with this printer - please read the entire guide. (It is long, I know, but this is a necessary evil!)

Communities

@jagrosh
jagrosh / WebhookTutorial.md
Last active December 4, 2023 20:28
Simple Webhook Tutorial (Twitter -> Discord)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel

Step 1 - Register on Zapier

  1. Go to https://zapier.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets