Skip to content

Instantly share code, notes, and snippets.

View shakir-abdo's full-sized avatar
🔥
Stay hungry Stay foolish

Shakir abdo shakir-abdo

🔥
Stay hungry Stay foolish
View GitHub Profile
@shakir-abdo
shakir-abdo / filename-to-txt.bat
Created September 7, 2023 09:34 — forked from vizsumit/filename-to-txt.bat
This script generates .txt caption files from .jpg file names
@echo off
for %%i in (*.jpg) do (
set filename=%%i
set caption_filename=%%~ni.txt
set caption=%%~ni
setlocal EnableDelayedExpansion
for /f "tokens=1 delims=()" %%a in ("!caption!") do (
@shakir-abdo
shakir-abdo / LoraConfig.json
Created September 7, 2023 09:33 — forked from vizsumit/LoraConfig.json
settings for Kohya_ss LoRA Training
{
"pretrained_model_name_or_path": "D:/Others/StableDiffusion/checkpoints/Stable-diffusion/realistic-vision-v13.ckpt",
"v2": false,
"v_parameterization": false,
"logging_dir": "D:/Others/StableDiffusion/training_data/log",
"train_data_dir": "D:/Others/StableDiffusion/training_data/images",
"reg_data_dir": "",
"output_dir": "D:/Others/StableDiffusion/training_data/model",
"max_resolution": "512,512",
"learning_rate": 0.0001,
@shakir-abdo
shakir-abdo / boilerplate.js
Created May 6, 2023 19:08 — forked from dennyabrain/boilerplate.js
Strapi File Upload
import React, { useState } from "react"
import { Box, Grommet, Button, TextInput } from "grommet"
import TattleTheme from "../atomic/theme"
import Dropzone from "react-dropzone"
import axios from "axios"
const Queries = () => {
const [question, setQuestion] = useState("")
const [files, setFiles] = useState([])
@shakir-abdo
shakir-abdo / NeverGonnaGiveYouUp.gcode
Created February 7, 2023 14:23 — forked from ZappaBoy/NeverGonnaGiveYouUp.gcode
Never Gonna Give You Up - Marlin gcode for 3d printer
; Play Never Gonna Give You Up
; Add the following lines to your slicer software to play the songs.
M300 S494 P250
M300 S554 P250
M300 S587 P250
M300 S494 P250
M300 S0 P250
M300 S659 P250
M300 S740 P250
M300 S659 P750
@shakir-abdo
shakir-abdo / bootstrap-breakpoint.css
Created August 20, 2022 20:14 — forked from WebDevSimplified/bootstrap-breakpoint.css
This stylesheet adds text describing the current Bootstrap Breakpoint in the top right corner of the screen.
body {
margin-top: 40px; /* This margin just makes the text easier to read. You can remove it if you want since it can mess with your other styles. */
}
body::before {
content: "XS";
color: red;
font-size: 2rem;
font-weight: bold;
position: fixed;
@shakir-abdo
shakir-abdo / attributes.rb
Created August 14, 2022 11:02 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'

Quick Start

sudo curl https://gist.githubusercontent.com/pankaj28843/3ad78df6290b5ba931c1/raw/soffice.sh > /usr/local/bin/soffice && sudo chmod +x /usr/local/bin/soffice

Create an bash script at /usr/local/bin/soffice with following content

#!/bin/bash

# Need to do this because symlink won't work
@shakir-abdo
shakir-abdo / vue-chartjs.js
Created February 12, 2021 07:27 — forked from package71/vue-chartjs.js
Nuxt vue-chartjs
import Vue from "vue";
import {Bar, Line, mixins} from "vue-chartjs";
Vue.component("chartline", {
extends: Line,
mixins: [mixins.reactiveProp],
props: ["options"],
mounted() {
const max = Math.max(...this.chartData.datasets[0].data);
this.renderChart(this.chartData, {
@shakir-abdo
shakir-abdo / mongodb_install.sh
Created January 6, 2021 23:37 — forked from Maria-UET/mongodb_install.sh
One-click Install and Configure MongoDB on Ubuntu
#!/bin/bash
######## Run this bash script with to install Mongodb on your system ##########
# HOWTO:
# System recommendation : Ubuntu 16.04
# Download the script
# Open in bash and make it executable with command: chmod +x mongodb_install.sh
# Run with command: sudo ./mongodb_install.sh