Skip to content

Instantly share code, notes, and snippets.

View botnetdobbs's full-sized avatar
🏠
Working from home

Lazarus Odhiambo botnetdobbs

🏠
Working from home
View GitHub Profile
@nuga99
nuga99 / docker-install-parrot.sh
Last active April 29, 2024 19:18
Install Docker Engine on Parrot OS (2023)
#!/bin/sh
# From https://www.hiroom2.com/2017/09/24/parrotsec-3-8-docker-engine-en/
# Changelog:
# @DavoedM: Apr 3, 2020
# @C922A10971734: Jan 19, 2023
set -e
# Install dependencies.
@gokulkrishh
gokulkrishh / alignments.css
Last active February 7, 2022 15:08
CSS Layout - Align an element Horizontal & Vertical center
/* HTML */
<div class="container">
<div class="child"></div>
<div>
/* Basic Style */
.container {
width: 500px;
@zanechua
zanechua / azure-pipelines.yml
Last active April 11, 2023 11:51
Azure Pipeline + Laravel + MySQL + PHPUnit + Laravel Dusk
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
pool:
vmImage: 'Ubuntu 16.04'
variables:
phpVersion: 7.2
@gokulkrishh
gokulkrishh / snippets.js
Last active March 26, 2019 07:46
Useful snippets for web development.
// Add any library to application
((library = 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.15.0/lodash.min.js') => {
var element = document.createElement('script');
element.src = library;
element.type = 'text/javascript';
document.head.appendChild(element);
})();
// Trace any properties
const traceProperty = (object, property) => {
@BenSampo
BenSampo / deploy.sh
Last active April 30, 2024 03:41
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH
@CyberPunkCodes
CyberPunkCodes / osx-install-composer.txt
Created June 13, 2016 19:52
My OSX Composer Install Guide
Create a new directory in /usr/local for composer, and setup directory for downloading the installer.
-> cd /usr/local
-> mkdir composer
-> cd composer
-> mkdir setup
-> cd setup
Inside the setup directory, we are going to follow the instructions to download Composer.
@vasanthk
vasanthk / System Design.md
Last active May 3, 2024 07:46
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@gokulkrishh
gokulkrishh / media-query.css
Last active May 3, 2024 06:40
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@henriquemoody
henriquemoody / http-status-codes.php
Last active January 26, 2024 10:29
List of HTTP status codes in PHP
<?php
/**
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
*
* You may also want a list of unofficial codes:
*
* 103 => 'Checkpoint',
* 218 => 'This is fine', // Apache Web Server
* 419 => 'Page Expired', // Laravel Framework
@hezhao
hezhao / myapp.conf
Last active May 20, 2022 05:34
Example supervisor config file /etc/supervisor/conf.d/myapp.conf
[program:myapp]
autostart = true
autorestart = true
command = python /home/pi/myapp.py
environment=HOME="/home/pi",USER="pi",SECRET_ID="secret_id",SECRET_KEY="secret_key_avoiding_%_chars"
stdout_logfile = /home/pi/stdout.log
stderr_logfile = /home/pi/stderr.log
startretries = 3
user = pi