Skip to content

Instantly share code, notes, and snippets.

View nbriz's full-sized avatar

Nick Briz nbriz

View GitHub Profile
@nbriz
nbriz / convert.php
Created April 8, 2016 15:54
convert image into base64 encoded string
<!DOCTYPE html>
<html>
<head>
<title> img to data</title>
<meta charset="utf-8">
<style>
textarea{ width: 50%; height: 200px; }
</style>
</head>
<body>
@nbriz
nbriz / scss-v-css.md
Last active June 13, 2024 07:58
SCSS vs modern CSS

CSS vs SASS

CSS on its own can be fun, but stylesheets are getting larger, more complex, and harder to maintain. This is where a preprocessor can help. Sass lets you use features that don't exist in CSS yet like variables, nesting, mixins, inheritance and other nifty goodies that make writing CSS fun again.

that's from the Sass website, while I agree that may have been true 10 years ago, CSS has come a long way since then :) i think most of Sass's features (as listed here) are all things CSS3 has since taken care of. so, without further ado, my case:

Variables

SCSS (example from their website)

@nbriz
nbriz / divRave.js
Last active March 15, 2023 18:05
just for fun :)
// PASTE THIS IN YOUR CONSOLE ( worx best in chrome )
// `~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~
// chrome console: OPTION + COMMAND + J
// firefox console: OPTION + COMMAND + K
// `~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~`~._.~
// WARNING FLASHING LIGHTS!!!!
setInterval(function(){
d=document.getElementsByTagName('div');
for(i=0; i<d.length; i++) {
@nbriz
nbriz / example-sketch.html
Created July 25, 2022 20:05
example-sketch.html
<style>
body {
margin: 0;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/p5@1.4.2/lib/p5.js"></script>
<script>
const W = innerWidth
@nbriz
nbriz / index.html
Created October 18, 2019 00:06
a basic html5 structure
<!DOCTYPE html>
<html>
<head>
<!-- meta info like the title and author of the page goes here -->
<!-- also links to any stylesheets, favicons or js libraries :)-->
</head>
<body>
@nbriz
nbriz / leave_facebook.js
Last active October 16, 2018 10:36 — forked from subimage/jquery-2.1.1.min.js
all-in-one script ( with parameters ) >> big thnx to @subimage && xtra updates by Luigi DiGangi
// forked from subimage's modifications of my much messier prior scripts
// ( https://gist.github.com/subimage/d952e49c9184d6a7a74f )
// after entering jquery into ur console, enter the code below in ur console
// then load a few months of activity && enter leaveFacebook(); into ur console
// u can specify parameters like so: leaveFacebook('Unlike'); if u only want to unlike
// or leaveFacebook('Unfriend'); if u only want to unfriend
// etc...
// visit nickbriz.com/facebook for vidz && details
@nbriz
nbriz / gist:46db7bf9a439bc874ed1
Last active February 27, 2018 15:46
onlyLargePhotos.js
var imgHTML = [];
var imgs = document.querySelectorAll(".fbPhotoStarGridElement");
imgs.forEach((el, i)=>{
imgHTML.push('<img src="'+el.getAttribute('data-starred-src')+'">');
});
document.body.innerHTML = imgHTML;
@nbriz
nbriz / gist:a953329e41afaef392d0
Last active February 27, 2018 15:38
quickscroll.js
var pheight = 0;
function quickScroll(){
if(pheight < document.height){
pheight = document.height;
window.scrollBy(0, document.height);
setTimeout(quickScroll, 500); // adjust incase ajax is slow
}
}quickScroll();

Keybase proof

I hereby claim:

  • I am nbriz on github.
  • I am nickbriz (https://keybase.io/nickbriz) on keybase.
  • I have a public key ASA9ponWFHHMc8jG1vcQY0jrLM-Fqp-1xvBRLTG40RXgHQo

To claim this, I am signing this object:

@nbriz
nbriz / BBsnakeLogo.js
Created May 9, 2013 15:56
playing w/canvas >> logo/snake generative animation
/* Author: Branger_Briz
....***....
dXXXXXXXXXXXXXXXb
dXXXXXXXXXXXXXXXXXXb.
,dXXXXXXXXXXXXXXXXXXXXXb.
dXXXXXXXXXXXXXXXXXXXXXXXXb.
^ 9XXXP"`V```~VVVVV~''V''dXXXP ^
dX\ . )XP )XXX( 9XP . /XP
9X\/\ |XP .9X^XXP \P /\/\XXP
9X \XP' __/XP/\XXX\___ 9/X/ XXP'