Skip to content

Instantly share code, notes, and snippets.

@luxplanjay
luxplanjay / visually-hidden.css
Last active May 21, 2024 17:52
Visually hidden CSS pattern
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
white-space: nowrap;
clip-path: inset(100%);
@BIGBALLON
BIGBALLON / extract_ILSVRC.sh
Created May 13, 2018 20:09
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/
@bradtraversy
bradtraversy / js_linked_list.js
Last active May 21, 2024 17:52
JS Linked List Class
// Construct Single Node
class Node {
constructor(data, next = null) {
this.data = data;
this.next = next;
}
}
// Create/Get/Remove Nodes From Linked List
class LinkedList {
#######
## These results are still open to the public. See
## https://blog.ktz.me/the-best-media-server-cpu-in-the-world/
## for analysis of them.
# https://github.com/ironicbadger/quicksync_calc
# zoidberg - dell 7040 sff pc
CPU TEST FILE BITRATE TIME AVG_FPS AVG_SPEED AVG_WATTS
i5-6600T h264_1080p_cpu ribblehead_1080p_h264 18952 kb/s 116.352s 29.88 1.04x N/A
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 21, 2024 17:50
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@tajpure
tajpure / marked-katex.js
Created August 14, 2016 10:44
Support katex for marked.
const renderer = new marked.Renderer()
let originParagraph = renderer.paragraph.bind(renderer)
renderer.paragraph = (text) => {
const blockRegex = /\$\$[^\$]*\$\$/g
const inlineRegex = /\$[^\$]*\$/g
let blockExprArray = text.match(blockRegex)
let inlineExprArray = text.match(inlineRegex)
for (let i in blockExprArray) {
const expr = blockExprArray[i]
const result = renderMathsExpression(expr)
@sharmaeklavya2
sharmaeklavya2 / cp_syllabus.md
Last active May 21, 2024 17:46
Competitive Programming Syllabus

Competitive Programming Syllabus

Geometry

  • Problems - Refer the article for a list of problems which can be solved using Rotating Calipers technique.
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"comment.line",
"constant",
"constant.character",
@viswanathsaj
viswanathsaj / LatestPost.js
Last active May 21, 2024 17:40
Implementation for a load more button in React/NextJS using Ghost CMS
// Make sure you are pulling ALL your posts from the ghost API [No limit]
function LatestPost (props) {
const [ postNum, setPostNum] = useState(3); // Default number of posts dislplayed
function handleClick() {
setPostNum(prevPostNum => prevPostNum + 3) // 3 is the number of posts you want to load per click
}