Skip to content

Instantly share code, notes, and snippets.

@kri26
kri26 / index.css
Created April 29, 2021 18:43
Three.js - Load .OBJ ?
html, body {
margin: 0;
height: 100%;
}
#c {
width: 100%;
height: 100%;
display: block;
}
@kayot88
kayot88 / main.js
Created November 4, 2018 18:07
js copy obj (all types)
function deepClone(obj) {
var copy;
// Handle the 3 simple types, and null or undefined
if (null == obj || "object" != typeof obj) return obj;
// Handle Date
if (obj instanceof Date) {
copy = new Date();
copy.setTime(obj.getTime());
@b21827335
b21827335 / index.css
Created December 6, 2021 09:34
WebGL - load obj - cube
@import url("https://webglfundamentals.org/webgl/resources/webgl-tutorials.css");
body {
margin: 0;
}
canvas {
width: 100vw;
height: 100vh;
display: block;
}
@greggman
greggman / index.css
Created October 17, 2020 16:56
Load Obj - Stack Overflow
body { margin: 0; }
canvas { width: 100vw; height: 100vh; display block; }
@mgmacri
mgmacri / README.md
Last active April 26, 2024 04:32
WebGL - load obj - cube
@codewithgun
codewithgun / laravel-local-pusher.md
Created April 22, 2021 15:40
Laravel web socket with local pusher and custom authentication

Laravel local websocket

Customized authentication will be used in this gist instead of default Auth facade provided by Laravel

Create project

composer create-project laravel-laravel your-project-name
cd your-project-name
@dun4n
dun4n / vcard.html
Last active April 26, 2024 04:32
#JavaScript vcard generator example
<!doctype html>
<html>
<head>
<script type="text/javascript" src="vcard2.js"></script>
</head>
<body>
<script type="text/javascript">
// With helper methods
var fooBar = vCard.create(vCard.Version.FOUR)
fooBar.addFormattedname("Mr Foo Bar")
@shuradrozd
shuradrozd / script.js
Created July 21, 2017 15:51
obj Stack with methods
function Stack() {
collection = [];
this.print = function() {
console.log(collection);
return this;
};
this.push = function(elem) {
@ianhenderson
ianhenderson / proxy.js
Last active April 26, 2024 04:31
Sample ES6 Proxy obj
var sampleProxy = new Proxy({}, {
get: function (target, key) {
console.log(`get key: ${key}`)
return target[key]
},
set: function (target, key, newValue) {
console.log(`set ${key} = ${newValue}`)
return target[key] = newValue
@kalpeshsingh
kalpeshsingh / pre-push
Last active April 26, 2024 04:31
A pre-push git hook that notify Amazon Chime group
#!/bin/sh
branch="$(git rev-parse --abbrev-ref HEAD)"
# get computer name to append in Chime message
username=$USER
# a branch name where you want to prevent git push. In this case, it's "master"
if [ "$branch" = "master" ]; then
echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup