Skip to content

Instantly share code, notes, and snippets.

@mithicher
mithicher / card-weather-forecast.blade.php
Created September 8, 2021 10:56
Weather Forecast Card Blade Component
// Usage
// <x-card-weather-forecast location="Guwahati" api-key="your-weatherapi.com-api-key" />
@props([
"location" => "Guwahati",
"apiKey" => "",
"poll" => 10000
])
<div class="bg-white shadow rounded-lg p-5 dark:bg-gray-800 max-w-full"
@stefanzweifel
stefanzweifel / list-of-domains-hosted-on-forge.js
Last active March 3, 2020 14:49
Quick and dirty hack to get a list of all domains hosted on Forge. Run it in your browser console. You still have to manually remove the server name strings.
let domains = Array.from($('.nav-item')[1].children[1].children);
let domainList = domains.map(function (item) {
return item.textContent.replace(/(\r\n|\n|\r)/gm, "").trim();
});
console.table(domainList);

Visual Studio Code shortcuts I use often

Navigation

Sidebar:

  • Cmd-Shift-F: search
  • Cmd-Shift-E: files

Navigating in current editor:

@dillinghamio
dillinghamio / @role.md
Last active April 20, 2021 00:39
@ROLE Blade Directive For Laravel Spark

@role Blade Directive For Laravel Spark

Assumes you're using teams

Add this to the boot() method of your AppServiceProvider

\Blade::directive('role', function($roles) {

 $user = auth()-&gt;user();
@paulirish
paulirish / bling.js
Last active November 4, 2024 17:48
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
@imjasonh
imjasonh / markdown.css
Last active November 6, 2024 14:26
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@laracasts
laracasts / gist:f4a304232c1be6dbb4f8
Last active August 3, 2024 16:45
Laracasts PHPStorm theme.
@ericlbarnes
ericlbarnes / bower.json
Last active January 8, 2024 01:52
Gulp, Bower, Bootstrap Sass, FontAwesome
{
"name": "project",
"version": "0.0.0",
"authors": [
"Eric Barnes <[email protected]>"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
@fideloper
fideloper / install.sh
Last active October 30, 2023 20:03
Vagrant Provisioning Script for PHP applications. This installs a LAMP stack.
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active January 30, 2024 02:30
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line: