Skip to content

Instantly share code, notes, and snippets.

View iamkarsoft's full-sized avatar
🏘️
Working from Home | Experimenting | Learning

Kofi Ramos iamkarsoft

🏘️
Working from Home | Experimenting | Learning
View GitHub Profile
@iamkarsoft
iamkarsoft / .php-cs-fixer.php
Created June 2, 2022 14:26 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
<x-layout>
<x-slot name="head">
<x-social-media-meta
title="Blade Component Examples"
description="Learn about all sorts of Blade component tips and tricks."
image="https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg"
card="summary"
/>
</x-slot>
@iamkarsoft
iamkarsoft / sublime-text-3-open-in-command-line.txt
Created October 23, 2021 00:44 — forked from placidrod/sublime-text-3-open-in-command-line.txt
Sublime Text 3 - Open in Command Line (Windows)
You can open sublime text from command line with subl.exe and subl. The second one has a problem. If sublime text is not open already,
when you open sublime text with subl, the command prompt will wait until sublime text is closed. So, you cannot do anything else in
terminal, unless you open another terminal. This is useful in some cases. But sometimes its a pain.
Method 1: Open with subl.exe
1. Go to Control Panel > Advanced System Settings -> Advanced -> Environment Variables
2. Create a new system variable called SUBLIME that will point to the folder of your Sublime installation.
Variable Name: SUBLIME
Variable Value: C:\Program Files\Sublime Text 3
@iamkarsoft
iamkarsoft / laravel-ci-cd-workflow.yml
Created July 6, 2021 12:32 — forked from JustinByrne/laravel-ci-cd-workflow.yml
Github Action to test laravel and then compile the assets to a production branch
name: CI/CD workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
testing:

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@iamkarsoft
iamkarsoft / media-query.css
Created September 23, 2020 18:18 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@iamkarsoft
iamkarsoft / Javascript ISO Country Lists for Select2 Plugin
Created May 23, 2020 14:33 — forked from starx/Javascript ISO Country Lists for Select2 Plugin
ISO 3166-1 alpha-2 country code to country name conversion with a implementation for Select2 plugin [Demo 1: http://jsfiddle.net/Starx/sgb4888k/1/, Demo 2 (With flags): http://jsfiddle.net/Starx/sgb4888k/2/]]
(function($) {
$(function() {
var isoCountries = [
{ id: 'AF', text: 'Afghanistan'},
{ id: 'AX', text: 'Aland Islands'},
{ id: 'AL', text: 'Albania'},
{ id: 'DZ', text: 'Algeria'},
{ id: 'AS', text: 'American Samoa'},
{ id: 'AD', text: 'Andorra'},
{ id: 'AO', text: 'Angola'},
<div class="quote big" style="background-image: url('<?php echo wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ); ?>');">
</div>
@iamkarsoft
iamkarsoft / node_nginx_ssl.md
Created September 23, 2019 18:54 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to Digital Ocean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@iamkarsoft
iamkarsoft / UuidModel.php
Created August 25, 2019 12:37 — forked from hopeseekr/UuidModel.php
A drop-dead simple UUID base model class for Laravel 5
<?php
namespace App\Models;
use Ramsey\Uuid\Uuid;
/**
* App\Models\UuidModel.
*
* @mixin \Eloquent