Skip to content

Instantly share code, notes, and snippets.

View sameerkumar18's full-sized avatar
☑️
Building

Sameer Kumar sameerkumar18

☑️
Building
View GitHub Profile
@piraz
piraz / monitor_service.py
Last active April 6, 2022 02:58
Script that monitors a service running on systemd. If service is not running the script will try to start the service.
#!/bin/python
#
# Copyright 2016 Flavio Garcia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@lmcneel
lmcneel / remove-node-modules.md
Last active July 31, 2025 14:34
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
@ankurk91
ankurk91 / laravel_horizon.md
Last active January 23, 2025 05:08
Laravel Horizon, redis/valkey-server, supervisord on Ubuntu server

Laravel Horizon, redis-server, supervisord on Ubuntu 20/22/24 server

Laravel 10+, Horizon 5.x, Redis/Valkey 7+

Prepare application

  • Install and configure Laravel Horizon as instructed in docs
  • Make sure you can access the Horizon dashboard like - http://yourapp.com/horizon
  • For now; it should show status as inactive on horizon dashboard

Install redis-server

@roens
roens / supervisor-log-compress.sh
Last active March 1, 2021 07:49
Since `supervisord` [lacks an option for compression of rotated log files](https://github.com/Supervisor/supervisor/issues/322), I wrote this script. It works well to live in `/etc/cron.daily`.
#!/usr/bin/env bash
# supervisor-log-compress.sh
#
# supervisord writes logs, and rotates them, but does not compress old log
# files. This script is meant to help with that cleanup, reclaiming storage.
#
# A nice place for this script is in: /etc/cron.daily/
for f in /var/log/supervisor/*.log.*; do
@PierreThiollent
PierreThiollent / Readme.md
Last active February 6, 2025 10:24
iTerm2 and Oh-my-zsh config

Setup iTerm2 and oh-my-zsh

Enjoy ! 😄

Install iTerm 2

Download iTerm2 here.

@vincelwt
vincelwt / cancelAll.js
Created April 15, 2020 14:48
Scripts to migrate all subscriptions between two Stripe accounts
// Cancel all the Stripe subscriptions supplied from a CSV export
const fs = require('fs')
const neatCsv = require('neat-csv')
const moment = require('moment')
const stripe = require('stripe')('sk_live_xxx')
// subscriptions.csv is the full export of subs from the stripe billing dashboard
fs.readFile('./subscriptions.csv', async (err, data) => {
if (err) return console.error(err)