Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
foo is boring I am Bar Horing

Bar Horing Amir barhoring

💭
foo is boring I am Bar Horing
View GitHub Profile
@barhoring
barhoring / index.html
Created Apr 8, 2022
simple html + css to start coding
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../assets/style.css" />
<title>Starter Files and Tooling Setup!</title>
</head>
<style>
View gitpen.sh
# run like:
# LINK=https://codepen-api-export-production.s3.us-west-2.amazonaws.com/zip/PEN/*********/*****************/2a-end-flexbox-grid-system.zip
# sh gitpen.sh $LINK
# example
# sh gitpen.sh https://codepen-api-export-production.s3.us-west-2.amazonaws.com/zip/PEN/*********/*****************/2a-end-flexbox-grid-system.zip
#
MYVAR=$1
NAME="${MYVAR#http://}"
@barhoring
barhoring / index.js
Created Oct 2, 2021 — forked from zkat/index.js
npx is cool
View index.js
#!/usr/bin/env node
console.log('yay gist')
@barhoring
barhoring / SetFileList.html
Created Jun 16, 2021 — forked from guest271314/SetFileList.html
Set the FileList of <input type="file"> to arbitrary File objects
View SetFileList.html
<!DOCTYPE html>
<!-- guest271314 11-12-2017 -->
<!-- see https://stackoverflow.com/questions/47119426 -->
<html>
<head>
</head>
<body>
<script>
@barhoring
barhoring / guide.md
Created Jun 8, 2021
How to deploy a routed React app to gh-pages
View guide.md

How to deploy a routed React app to gh-pages

Add homepage to package.json "homepage": "https://{user_name}.github.io/{repo_name}/",

Install gh-pages package

npm i gh-pages

Replace all '/' in the app with process.env.PUBLIC_URL

@barhoring
barhoring / .babelrc
Created Jun 7, 2021
ESLint + Prettier + Babel configuration
View .babelrc
{
"plugins": ["syntax-dynamic-import"]
}
@barhoring
barhoring / main.js
Created Dec 20, 2020
create promise array and use axios to wait for all to return
View main.js
{/*
LIVE EXAMPLE:
https://repl.it/@BarHoring/multiple-http#index.js
*/}
const axios = require('axios');
const fs = require('fs');
const dependencies = [
"@babel/polyfill",
"@blueprintjs/select",
@barhoring
barhoring / qs.py
Created Nov 24, 2020
Django - Iterate over queryset
View qs.py
qs = Clinic.objects.prefetch_related('users')
values = tmp.values()
for item in values:
print(item)
@barhoring
barhoring / dropdown.md
Created Sep 25, 2020 — forked from citrusui/dropdown.md
"Dropdowns" in Markdown
View dropdown.md
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.