Instantly share code, notes, and snippets.

Can't stop

Agney Menon BoyWithSilverWings

View GitHub Profile
View server.js
const axios = require("axios");
async function getData() {
const response = await axios.get("");
View intersection-detail.js
var observer = new IntersectionObserver(changes => {
for (const change of changes) {
console.log(change.time); // Timestamp when the change occurred
console.log(change.rootBounds); // Unclipped area of root
console.log(change.boundingClientRect); // target.boundingClientRect()
console.log(change.intersectionRect); // boundingClientRect, clipped by its containing block ancestors, and intersected with rootBounds
console.log(change.intersectionRatio); // Ratio of intersectionRect area to boundingClientRect area
console.log(; // the Element target
}, {});
View intersection-intro.js
const observer = new IntersectionObserver(callback);
const target = document.querySelector('#target');
function callback(entries) {
// Do action here
View setStateCallback.js
function handleChange(value) {
value: newValue
}, ()=>{
View setState.js
function handleChange(value) {
value: newValue
console.log(this.state.value); //Why is my state not updated?
View gist:0a1e2c7dc4671735504912f83b44cf67
codemod "expect\((.*?)\.hasClass\(('.*?')\)\)\.to\.equal\(true\)" 'expect(\1.classes()).to.include(\2)'
codemod "expect\((.*?)\.hasClass\(('.*?')\)\)\.to\.equal\(false\)" 'expect(\1.classes()).to.not.include(\2)'
codemod "expect\((.*?)\.hasAttribute\(('.*?'),('.*?')\)\)\.to\.equal\(true\);" ''
View fibonacci.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="thengascript.js"></script>
View javascriptreact.json
"Print to console": {
"prefix": "log",
"body": [
"description": "Log output to console"
"Bind Function": {
"prefix": "bind",
View style.css
.container {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
import cv2
import numpy as np
from skimage import img_as_float
#Read image from given direcotory
image = cv2.imread('C:\Python27\images\pic.jpg')
#Print pixel at (100,100)
print image[100,100]
#................ image converted to float.............