Skip to content

Instantly share code, notes, and snippets.

isimmons / custom.d.ts
Created December 19, 2022 07:00
TS module declarations for css and images
View custom.d.ts
// react specific css modules
declare module '*.module.css' {
const content: Record<string, string>;
export default content;
// react specific for direct svg import
declare module '*.svg' {
import React = require('react');
export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
isimmons /
Last active November 17, 2022 09:26
Code updates for insidewebdev youtube course twitter-clone

Using Nuxt 3 RC 13 (latest as of Nov 9, 2022)

update using Nuxt 3 stable release.

So far two major changes are the names of useBody changed to readBody and useCookies changed to parseCookies.

Still having issue with having to refresh page to get content to show or to get the correct tweetId from the url. Will update as soon as I figure it out.

I'll be documenting updated code changes here while going through the course. Once I finish the course I'll upload the complete project

isimmons / Pint.php
Last active October 3, 2022 00:00
pointless artisan command to run vendor/bin/pint but was a good learning experience how to call php scripts from artisan. Borrowed code from artisan serve
View Pint.php
namespace App\Console\Commands;
use Closure;
use Exception;
use Illuminate\Console\Command;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
isimmons / gist:34affa75901d0c6dd86e2143a1a019fc
Created July 22, 2022 15:52
skaffold dev -vdebug output for course project sg microservices with node and react
View gist:34affa75901d0c6dd86e2143a1a019fc
app: auth-mongo
type: ClusterIP
apiVersion: apps/v1
kind: Deployment
labels: c6b4d167-f7f4-4be2-b880-d0dfe04b6a59
isimmons / OpenWithSublime.bat
Created September 29, 2021 00:32 — forked from jcppkkk/OpenWithSublime.bat
[[[ Move to !!! ]]] Add context menu to allow user open file or folder with Sublime as User (or as Admin).
View OpenWithSublime.bat
@echo off
:: Path to Sublime Text installation dir.
SET stPath=%~dp0sublime_text.exe
SET stPathOnly=%~dp0
:: Key name for the registry entries.
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
:: Context menu texts.
SET "UserMenuText=Open with Sublime(&-)"
SET "AdminMenuText=Open with Sublime As Admin(&+)"
isimmons / TableSeeder.php
Last active August 29, 2015 14:04
Laravel TableSeeder
View TableSeeder.php
class DatabaseSeeder extends Seeder {
* Tables to be truncated and seeded
* @var array $tables
private $tables = [
isimmons / github.css
Created February 22, 2014 06:14 — forked from tuzz/github.css
View github.css
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
color: #333;
isimmons / package.json
Last active August 29, 2015 13:56
Gulp package.json devDependencies for use with
View package.json
"devDependencies": {
"gulp-livereload": "~1.0.1",
"tiny-lr": "0.0.5",
"gulp-autoprefixer": "0.0.6",
"gulp-notify": "~0.4.3",
"gulp-util": "~2.2.14",
"gulp-ruby-sass": "~0.3.0",
"gulp-phpunit": "0.0.3",
"gulp": "~3.5.2",
isimmons / gulpfile.js
Last active August 29, 2015 13:55
gulpfile for gulp.js + Laravel: Compile sass/coffee, run phpunit tests, livereload css, js, and blade templates
View gulpfile.js
See dev dependencies
Compiles sass to compressed css with autoprefixing
Compiles coffee to javascript
Livereloads on changes to coffee, sass, and blade templates
Runs PHPUnit tests
Watches sass, coffee, blade, and phpunit
Default tasks sass, coffee, phpunit, watch
isimmons / gist:8202227
Last active November 18, 2022 00:39
Truncate tables with foreign key constraints in a Laravel seed file.
View gist:8202227

For the scenario, imagine posts has a foreign key user_id referencing

public function up()
	Schema::create('posts', function(Blueprint $table) {