Skip to content

Instantly share code, notes, and snippets.

View astro648's full-sized avatar

Ayaan astro648

View GitHub Profile
@astro648
astro648 / .gitignore
Created December 28, 2022 02:38 — forked from FullStackForger/.gitignore
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@astro648
astro648 / disclaimer.txt
Last active December 24, 2022 19:50
Test build disclaimer.
PRE-RELEASE TEST VERSION - This is a pre-release test build and not indicative of gameplay or content in an official release build.
@astro648
astro648 / jupyterlab_shortcuts.md
Created October 16, 2022 00:40 — forked from discdiver/jupyterlab_shortcuts.md
Common Jupyter Lab Keyboard Shortcuts

If you are on a Mac, substitute command for control. Don't type the + (it means press both keys at once).

Shortcuts when in either command mode (outside the cells) or edit mode (inside a cell):

  • Shift + Enter run selected cell or cells - if no cells below, insert a code cell below

  • Ctrl + B toggle hide/show left sidebar

  • Ctrl + S save and checkpoint

  • Ctrl + Shift + S save as

@astro648
astro648 / helloworld.cpp
Created July 8, 2022 00:05
Hello World in C++
#include <iostream>
using namespace std;
int main(){
cout<<"Hello World!"<<endl;
}
@astro648
astro648 / .gitignore
Created July 8, 2022 00:02
.gitignore template for Unity projects/repos - works with all types (2D, 3D, etc)
###
# Unity folders and files
###
/TowerDefenseGame/[Aa]ssets/AssetStoreTools*
/TowerDefenseGame/[Bb]uild/
/TowerDefenseGame/[Ll]ibrary/
/TowerDefenseGame/[Ll]ocal[Cc]ache/
/TowerDefenseGame/[Oo]bj/
/TowerDefenseGame/[Tt]emp/
/TowerDefenseGame/[Uu]nityGenerated/
@astro648
astro648 / bootstrap-buttons.txt
Created December 14, 2021 00:45
bootstrap button codes
btn-warning = orange
btn-danger = red
btn-success = green
btn-info = sky blue
btn-primary = blue
@astro648
astro648 / fabric.js
Created December 12, 2021 08:34
fabric.js for anyone who needs it (yes just one looong line of code)
var fabric=fabric||{version:"3.6.1"};if("undefined"!=typeof exports?exports.fabric=fabric:"function"==typeof define&&define.amd&&define([],function(){return fabric}),"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?fabric.document=document:fabric.document=document.implementation.createHTMLDocument(""),fabric.window=window;else{var jsdom=require("jsdom"),virtualWindow=new jsdom.JSDOM(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;fabric.document=virtualWindow.document,fabric.jsdomImplForWrapper=require("jsdom/lib/jsdom/living/generated/utils").implForWrapper,fabric.nodeCanvas=require("jsdom/lib/jsdom/utils").Canvas,fabric.window=virtualWindow,DOMParser=fabric.window.DOMParser}function resizeCanvasIfNeeded(t){var e=t.targetCanvas,i=e.width,r=e.height,n=t.destinationWidth,s=t.destinationHeight;i
@astro648
astro648 / console.LOG
Created November 25, 2021 01:35
errors
2
​ background_image = nasa_image_3.jpg
nasa_image_3.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
​ 17
​ 39
​ when right arrow is pressed, x = 20, y = 10
main.js:29 Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.
at uploadBackground (http://127.0.0.1:5500/main.js:29:6)
at right (http://127.0.0.1:5500/main.js:68:9)
@astro648
astro648 / gist:5693f30f370b33f4e5df62e11a621e83
Created September 18, 2021 02:28
arduino code error for the umpteenth time
Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Arduino Uno"
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\johnr\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10816 -build-path C:\Users\johnr\AppData\Local\Temp\arduino_build_770921 -warnings=all -build-cache C:\Users\johnr\AppData\Local\Temp\arduino_cache_34195 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgn
@astro648
astro648 / gist:3de1d8133d041dbdce1f00f7e6be5f22
Created September 18, 2021 02:26
very verbose arduino error msg
Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Arduino Uno"
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\johnr\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10816 -build-path C:\Users\johnr\AppData\Local\Temp\arduino_build_603018 -warnings=all -build-cache C:\Users\johnr\AppData\Local\Temp\arduino_cache_486954 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqg