Skip to content

Instantly share code, notes, and snippets.

View halvves's full-sized avatar
🌳

halvves

🌳
View GitHub Profile
@halvves
halvves / endpoint.txt
Last active February 2, 2022 03:33
shitpiece
https://hasura.hitpiece.com/v1/graphql
@halvves
halvves / IRC client in pure bash 4
Created July 31, 2021 18:47 — forked from anonymous/IRC client in pure bash 4
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
(function(){var m=21*Math.random()+30,b=document.createElement("span"),g=[],a=document.createElement("div"),c=window.innerHeight,e=window.innerWidth;b.style.fontSize="60px";b.textContent="\ud83d\udc17";b.style.position="absolute";a.style.position="fixed";a.style.left=a.style.right=0;a.style.height="100vh";a.style.width="100vw";a.style.overflow="hidden";a.style.zIndex=2147483647;a.style.background='rgba(0,0,0,0.6)';document.body.appendChild(a);for(var h=0;h<m;h++){var f=b.cloneNode(!0);f.r=Math.random();g.push(f);a.appendChild(f)}(function n(k){g.forEach(function(d,l){d.style.transform="translate("+(e-(k+1E3*l*d.r)/2%(e+64))+"px,"+(c-Math.sin(k/100-100*l*d.r)*c/8-c/8*d.r)+"px)"});requestAnimationFrame(n)})();window.addEventListener("resize",function(){c=window.innerHeight;e=window.innerWidth})})();
@halvves
halvves / .gitignore
Created December 3, 2018 07:55 — forked from skeeto/.gitignore
Rectangle area challenge
rect
@halvves
halvves / pixiRetinaResize.js
Created October 31, 2017 16:58 — forked from wojciak/pixiRetinaResize.js
A base implementation of properly handling viewport resize and rotation in PIXI.js (including retina support).
/**
* The width and height to which our graphic assets are designed for
* Keep in mind retina resolutions and remember to provide 2xWidth 2xHeight assets for them
*/
var targetWidth = 1024;
var targetHeight = 768;
/**
* The main (root) container on the stage
* You should always have a master container on your stage
#21252B,#282A2E,#777777,#FFFFFF,#515151,#9CA4B5,#80CD81,#EB4D5C
@halvves
halvves / merge_mongo_collections.js
Created January 31, 2017 21:49 — forked from ofirski/merge_mongo_collections.js
Merge MongoDB collections
/*******************************************************************************
* Merges matching documents from source collection into desination collection
* Usage:
* mergeCollections("srcCollName", "destCollName", null, ["f1","f3"])
* mergeCollections("srcCollName", "destCollName", {xy:"z"}, ["f1","f4"])
********************************************************************************/
function mergeCollections(sourceCollection, destCollection, sourceQuery, setFields) {
var nMatched = 0;
var nModified = 0;
sourceQuery = sourceQuery || {}
@halvves
halvves / quiz.md
Created September 29, 2016 06:18 — forked from gaearon/quiz.md

A top-level App component returns <Button /> from its render() method.

  1. What is the relationship between <Button /> and this in that Button’s render()?

  2. Does rendering <Button><Icon /></Button> guarantee that an Icon mounts?

  3. Can the App change anything in the Button output? What and how?


<body>
hey ddad
</body>
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);