Skip to content

Instantly share code, notes, and snippets.

View mirshko's full-sized avatar

Jeff Reiner mirshko

View GitHub Profile
@mirshko
mirshko / markquee.tsx
Last active May 5, 2021 13:12
useMarquee6k
import { useRef } from "react";
import useMarquee from "../useMarquee";
export default function Marquee({ text, ...rest }) {
const ref = useRef<HTMLDivElement>();
useMarquee(ref);
return (
<div className="flex-1 truncate mt-0.5" {...rest}>
<div ref={ref}>
@mirshko
mirshko / useSpace.js
Created July 21, 2020 09:45
3Box Space SWR Hook
import { useWeb3React } from "@web3-react/core";
import useSWR from "swr";
/**
* 3Box Box
*/
let box = null;
/**
* 3Box Space
@mirshko
mirshko / 3box
Created February 21, 2019 23:28
did:muport:Qmf5xWT9tSeK4sYcQ28iR1S3uD31RqnJdPf6v7cF8jcgYs
@mirshko
mirshko / rebaseBranchAndPush.sh
Created January 9, 2018 09:51
Bash script to update a git branch from master and then push it back to GitHub.
rebaseAndPush() {
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo "\nWorking branch: $BRANCH"
echo "\nRebase branch?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "\nUpdating $BRANCH from master" && git fetch origin && git rebase origin/master; break;;
No ) break;;
esac
@mirshko
mirshko / markup.html
Last active July 5, 2017 19:51
Post Google Analytics Events easily with data from data attributes on html elements
<a href="/page" cta-label="Event Name In Google Analytics">Button</a>
@mirshko
mirshko / pagination.html
Created March 13, 2017 19:58
Custom HubSpot blog pagination built with Materialize CSS
{% set total_pages = contents.total_page_count %}
<!-- sets variable for total pages -->
{% set more_pages = total_pages - current_page_num %}
<!-- sets variable for how many more pages are past the current pages -->
{% if total_pages > 1 %}
<ul class="pagination">
<li class="waves-effect {% if current_page_num == 1 %}disabled{% endif %}">
{% if current_page_num == 1 %}
<a><i class="material-icons">chevron_left</i></a>
{% else %}
@mirshko
mirshko / removeWindowsApps.txt
Created January 4, 2017 19:08
Getting rid of those damn pesky Windows apps
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
Get-AppxPackage *windowsalarms* | Remove-AppxPackage
Get-AppxPackage *windowscalculator* | Remove-AppxPackage
Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *windowscamera* | Remove-AppxPackage
Get-AppxPackage *officehub* | Remove-AppxPackage
Get-AppxPackage *skypeapp* | Remove-AppxPackage
Get-AppxPackage *getstarted* | Remove-AppxPackage
Get-AppxPackage *zunemusic* | Remove-AppxPackage
Get-AppxPackage *windowsmaps* | Remove-AppxPackage
@mirshko
mirshko / hubl-url-test.html
Created November 10, 2016 16:17
Trying to use `request.path` to add in a class if the URL matches a variable
{% for item in my_topics %}
{% set blog_topic_url = "/blog/topic/{{item.slug}}" %}
<li class="{% if request.path == 'blog_topic_url' %}v-active {% endif %} v-tab col s2"><a href="{{ group.absolute_url }}/topic/{{item.slug}}">{{ item }}</a></li>
{% endfor %}

Keybase proof

I hereby claim:

  • I am mirshko on github.
  • I am mirshko (https://keybase.io/mirshko) on keybase.
  • I have a public key whose fingerprint is B513 32C5 6E25 D26B DD7D C39A BA28 11C0 305A 7B68

To claim this, I am signing this object: