Skip to content

Instantly share code, notes, and snippets.

View tejesh0's full-sized avatar
:octocat:
๐Ÿ‘

tejesh tejesh0

:octocat:
๐Ÿ‘
View GitHub Profile
@kinngh
kinngh / pull-url.js
Created November 6, 2024 11:13
Pull passwordless demo store URL
async function getHrefFromUrl(url) {
try {
const response = await fetch(url, {
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
Accept:
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
Connection: "keep-alive",
@kctang
kctang / tailwind-angular
Created October 25, 2020 02:53
Tailwind CSS support in Angular 10, with Angular Material
Index: client/angular.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- client/angular.json (revision fcfaf7440d0eaed6baa841b2b4d9eca231b002f6)
+++ client/angular.json (date 1603593891228)
@@ -39,7 +39,7 @@
"prefix": "app",
"architect": {
@StanGirard
StanGirard / sitemap-crawler.py
Created March 2, 2020 21:33
Sitemap Crawler Python
###################
# You can find the article about this gist here:
# https://primates.dev/find-all-urls-of-a-website-in-a-few-seconds-python/
####################
import requests
from bs4 import BeautifulSoup as Soup
import pandas as pd
import hashlib
<script>
import LinearGradient from '@mattdesl/components/LinearGradient.txl';
import NoiseLines from '@mattdesl/components/NoiseLines.txl';
</script>
<LinearGradient />
<NoiseLines />
@hirobert
hirobert / .env
Created January 10, 2019 00:45 — forked from schavery/.env
New Relic RQ setup
NEW_RELIC_LICENSE_KEY=6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5
NEW_RELIC_LOG=stdout
NEW_RELIC_APP_NAME=proj--staging
@jonschlinkert
jonschlinkert / async-engine.js
Last active February 8, 2024 08:26
PoC of an async template engine using native template literals and async-await. Response to https://twitter.com/doowb/status/1072688034485805058
const compile = (input, helpers, thisArg) => {
return async data => {
let ctx = { ...thisArg, ...data };
let keys = [];
let vals = [];
if (helpers) {
for (let key of Object.keys(helpers)) {
if (ctx[key] === void 0) {
ctx[key] = (...args) => helpers[key].call(ctx, ...args);
@1hakr
1hakr / example.com
Last active November 29, 2024 20:48
Supercharge your NGIX config
proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off;
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name example.com;
location /api/ {
# Rate Limiting
limit_req zone=reqlimit burst=20; # Max burst of request
@muralikg
muralikg / background.js
Last active July 29, 2024 14:29
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
console.log(msg);
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {
@tejesh0
tejesh0 / index.html
Created January 21, 2018 05:29
center aligned stacked bar chart (pyramid chart)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Pyramid Chart</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#pyramid_chart {
height: 32vh;

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step).