Skip to content

Instantly share code, notes, and snippets.

View sadiqsalau's full-sized avatar
💻
Coding

Sadiq Salau sadiqsalau

💻
Coding
View GitHub Profile
@sadiqsalau
sadiqsalau / github-deploy-keys-ssh-config.txt
Last active November 18, 2022 13:30
Github deploy keys ssh example config
Host example-1.github.com
HostName github.com
User git
IdentityFile ~/.ssh/example_1
IdentitiesOnly yes
Host example-2.github.com
HostName github.com
User git
@sadiqsalau
sadiqsalau / generate-ssh-key.txt
Created November 18, 2022 13:36
Generate ssh keys
ssh-keygen -t ecdsa-sha2-nistp256 -C "[email protected]"
@sadiqsalau
sadiqsalau / git-repo-url.txt
Created November 18, 2022 13:44
Git clone example
[email protected]:example-user/example-repo.git
@sadiqsalau
sadiqsalau / .cpanel.yml
Last active April 26, 2023 04:45
Laravel API Cpanel deploy script
---
deployment:
tasks:
# If .deploy.conf doesn't exist, create it from .deploy.example.conf
- |
if [ ! -f .deploy.conf ]
then
cp .deploy.example.conf .deploy.conf
exit
else
@sadiqsalau
sadiqsalau / .cpanel.yml
Last active April 26, 2023 04:43
React Cpanel Deploy script
---
deployment:
tasks:
# If .deploy.conf doesn't exist, create it from .deploy.example.conf
- |
if [ ! -f .deploy.conf ]
then
cp .deploy.example.conf .deploy.conf
exit
else
@sadiqsalau
sadiqsalau / tsconfig.node.json
Last active December 26, 2022 09:32
Vite Polyfills
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.polyfills.ts", "vite.config.ts"]
}
@sadiqsalau
sadiqsalau / _dark_theme_mixin.scss
Created December 22, 2022 08:04
SCSS Mixin for dark theme
@use "sass:selector";
@mixin dark-theme() {
@at-root #{selector.nest("[data-theme=dark]", if(&, &, "&"))} {
@content;
}
}
@sadiqsalau
sadiqsalau / build.yml
Last active April 26, 2023 03:48
React App Build Workflow
name: "Build and Deploy"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: write
@sadiqsalau
sadiqsalau / README.md
Last active April 10, 2023 05:47
Laravel Thunder Client CSRF Filter

[UPDATE] Use this instead: https://gist.github.com/sadiqsalau/32b054dc42b4b0582e296b43efc7c496

You will need to follow these procedures to use the filter.

Consult docs: https://github.com/rangav/thunder-client-support

  1. Create an environment and attach it to your collection.
  2. Add a test to your collection by navigating to the Tests tab. Select Set Env Variable, set query to cookie.xsrf-token and value to {{XSRF-TOKEN}}
  3. Add the file csrf-filter.js to your scripts.
  4. In the Pre-Run tab, select custom filter and choose setCSRFToken