Skip to content

Instantly share code, notes, and snippets.

@joeljerushan
joeljerushan / PaginateApp.js
Last active December 26, 2024 17:58
React Pagination with Firebase FireStore - (Prev / Next Pagination)
import React, { useState, useEffect } from 'react'
//i'm using react-bootstrap for UI elements
import { Table, Button, ButtonGroup } from "react-bootstrap";
//firebase config
import firebase from './../../Firebase'
export default function App() {
const [list, setList] = useState([]);
const [page, setPage] = useState(1);
@brev
brev / unix_cookbok.md
Last active December 26, 2024 17:57
Unix Cookbook

Unix Cookbook

System

Find system naming:

uname  # os
uuname -l  # short
uname -a # detailed
@gustavovalverde
gustavovalverde / gh-environment-manager.sh
Last active December 26, 2024 17:56
A bash script to handle GitHub environment variables, mainly to create new environments, and copy variables values from one environment to another
#!/bin/bash
# MIT License
# Copyright (c) 2024 Gustavo A. Valverde
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@Changaco
Changaco / btrfs-undelete
Last active December 26, 2024 17:55
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <[email protected]>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
@Yatoom
Yatoom / setup.md
Last active December 26, 2024 17:54
Thinkfan configuration

Thinkfan setup

Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.

1. Install necessary programs

Install lm-sensors and thinkfan.

sudo apt-get install lm-sensors thinkfan
@nntrn
nntrn / espn-api-list.md
Last active December 26, 2024 17:54
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

  • June 2021 - list of endpoints for other sports/leagues (i.e. basketball, baseball, lacrosse, rugby)
  • August 2021 - get historical fantasy league data
  • September 2021 - list of endpoints in plain text
  • May 2023 - collapsed endpoint response examples

Additional Resources

@Kron4ek
Kron4ek / wine_launch_wrapper.sh
Last active December 26, 2024 17:49
Wine Launch Wrapper
#!/usr/bin/env bash
########################################################################
##
## Project name: Wine launch wrapper
## Version: 1.3.14
## Author: Kron4ek
## Contact emails: [email protected], [email protected]
## My GitHub profile: https://github.com/Kron4ek
##
@miketucker
miketucker / PhotoshopBlendModes
Created March 6, 2015 23:19
photoshop blending modes
/*
** Copyright (c) 2012, Romain Dura [email protected]
**
** Permission to use, copy, modify, and/or distribute this software for any
** purpose with or without fee is hereby granted, provided that the above
** copyright notice and this permission notice appear in all copies.
**
** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
@reyo
reyo / automations.yaml
Created December 26, 2024 17:42
Automatically extend LG WebOS Developer Mode with Home Assistant
- alias: Extend TV dev mode every night
trigger:
# Run this automation every night at 4 AM.
- platform: time
at: 04:00:00
condition:
# Run only if TV is off.
- condition: template
value_template: '{{ is_state("media_player.webos_tv", "off") }}'
action: