Skip to content

Instantly share code, notes, and snippets.

View tisseurdetoile's full-sized avatar
🏠
confiné

tisseurdetoile tisseurdetoile

🏠
confiné
View GitHub Profile
@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active October 14, 2024 00:05
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

@vipulwairagade
vipulwairagade / deploy.yml
Created July 17, 2020 15:38
Deploy Action of Github Workflow
name: Deploy to Github Pages
on:
push:
branches:
- develop
jobs:
deploy:
name: Deploy Application
runs-on: ubuntu-latest
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active November 18, 2024 14:50
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@ssledz
ssledz / asus-bt400-linux-install.md
Last active September 7, 2024 04:32
Linux Installation guide for Asus USB-BT400

Download driver

curl 'https://dlcdnets.asus.com/pub/ASUS/wireless/USB-BT400/DR_USB_BT400_1201710_Windows.zip' \
  -o bt400-driver.zip

Driver & tools for bt400 can be found here

Find out what is a filename for your driver

Plug device and do

@billpatrianakos
billpatrianakos / LIRC_Raspian_Buster.md
Last active October 18, 2024 13:12
How to set up LIRC on Raspbian Buster (2019, 4.x kernel)

Infrared and LIRC

*Beware: These instructions have been cobbled together from all of the sources I found that got my specific unit working. I can verify it works on a Pi 3B running the latest OS as of summer 2019. Everyone's hardware and system will be a bit different so your mileage may vary. Before you go crazy trying to debug issues sending a signal, grab an existing lirc config for any remote and use the lirc CLI to send a signal out and verify your hardware is sending the signal by viewing the IR LED through a front-facing smartphone camera (almost all smartphone front cameras - even new iPhones - will not filter out IR light and you should see the LED flash when sending a signal). If you see your hardware is sending a signal and/or you can see that the IR input is seeing some signal, then you know your setup works and the issue may be that the remote you're trying to learn simply won't work with LIRC. I know for a fact that many Comcast/Xfinity cable remotes are actually RF devices and need to have

@fmbenhassine
fmbenhassine / MyJob.java
Last active May 17, 2020 20:54
Spring Batch example of how to use a ClassifierCompositeItemWriter #SpringBatch https://stackoverflow.com/questions/53377660
package org.springframework.batch.sample;
import java.util.Arrays;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
@tisseurdetoile
tisseurdetoile / arrays_tips.js
Last active November 11, 2022 10:23
Array transformation for javaScript
/**
* Arrays to parse.
*/
const array_one = ['one', 'two', 'three', 'four']
const array_two = ['three', 'four', 'five', 'six']
const big_one = ['one', 'two', 'three', 'four', 'three', 'four', 'five', 'six']
const array_number = [1, 10, 100, 9, 7, 5, 4, 55, 76, 45, 32, 92, 41]
const array_obj_number = [
{ val: 1 },
{ val: 10 },
@lepiaf
lepiaf / unbound.conf
Last active April 3, 2024 21:36
Unbound configuration IPv4 and IPv6
server:
interface: 0.0.0.0
interface: ::0
access-control: 192.168.42.0/24 allow
access-control: 127.0.0.0 allow
access-control: 2001:db8:dead:beef::/48 allow
# unbound optimisation
num-threads: 4
@outout14
outout14 / README-Template.md
Last active October 23, 2021 09:33 — forked from PurpleBooth/README-Template.md
Une template pour faire un joli README.md

Titre du projet

(juste en dessous des badges sympatiques à placer)

forthebadge forthebadge

Une petite description du projet

Pour commencer

Entrez ici les instructions pour bien débuter avec votre projet...

@erica
erica / BTWhee.swift
Last active January 22, 2019 20:42
import Cocoa
import CoreBluetooth
import PlaygroundSupport
class BTHelper: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate {
var centralManager: CBCentralManager
override init() {
self.centralManager = CBCentralManager(delegate: nil, queue: nil)
super.init()