Skip to content

Instantly share code, notes, and snippets.

View Yohn's full-sized avatar
🔥
Playing with Fire

JWB Yohn

🔥
Playing with Fire
View GitHub Profile
@Yohn
Yohn / function.generateRandomString.php
Created January 9, 2023 05:01
Simple generate random string function in PHP with max length option and easy to change characters.
<?php
function generateRandomString($length = 10) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
}
  • Codacy
  • Coveralls
  • Travis
  • Lean Board
  • Starhub
  • Code Dog Auto Merge
  • Greenkeeper
  • Dependabot preview
  • Hound
  • Imgbot
@ghuntley
ghuntley / gitpod.yml reference
Last active September 24, 2022 21:09
Iterating on a reference Gitpod.yml that serves as a verbose 'documentation as code' which is intended to explain possibilities and how to configure them without folks needing to open a browser. Leave feedback on https://gist.github.com/ghuntley/1914fd5d15aec638d6dbb8d32d00f1e5 if you got any.
## Learn more about this file at 'https://www.gitpod.io/docs/references/gitpod-yml'
##
## This '.gitpod.yml' file when placed at the root of a project instructs
## Gitpod how to prepare & build the project, start development environments
## and configure continuous prebuilds. Prebuilds when enabled builds a project
## like a CI server so you can start coding right away - no more waiting for
## dependencies to download and builds to finish when reviewing pull-requests
## or hacking on something new.
##
## With Gitpod you can develop software from any device (even iPads) via
@Z3d0X
Z3d0X / FilamentQuickStart.php
Created April 8, 2022 19:34
Quickly install and configure filament in a new laravel project
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class FilamentQuickStart extends Command
{
protected $signature = 'filament:quickstart';
@rosswintle
rosswintle / build.php
Last active November 15, 2024 01:24
A VERY simple PHP static HTML generator that does a single-level extend, and includes with variable passing and that's about it.
<?php
/*
* Input: files matching src/pages/*.html
* Output: public/*.html
*
* Pages can extend a template by calling:
*
* extend(string $relativeTemplatePath, array $variables)
*
* at the start and:

🌆 Banco de imagens gratuitas

  • Burst - Plataforma de imagens do serviço de ecommerce Shopify
  • DrawKIT - Ilustrações para qualquer um usar
  • FlatIcon - Banco de ícones vetoriais
  • Flickr - Rede social de fotógrafos
  • FreeImages - Banco de imagens gratuitas
  • FreePik Stories - Banco de ilustrações gratuitas
  • Humaaans - Ilustrações de humanóides
  • Icons8 - Ícones em diversos estilos
  • Imgur - Plataforma com milhões de imagens
// This app initially started from Flavio Copes analytics example
// but diverged quite a bit to generate images as well as track views
// https://flaviocopes.com/count-visits-static-site/
const express = require('express')
const app = express()
// no db - so global var to keep track of count
let counter = 0
@abelcheung
abelcheung / firefox-viewsource-customize.md
Last active May 28, 2023 18:18
Customizing Firefox view-source style -- Solarized Dark theme with wallpaper

Customizing Firefox view-source style

TL;DR

  1. Open (or create) chrome/userContent.css under your Firefox profile folder
  2. Append attached CSS content and save file
  3. Toggle toolkit.legacyUserProfileCustomizations.stylesheets in Firefox about:config
  4. Restart Firefox

firefox view-source style customization

@arvi
arvi / framework7-messages-socketio.js
Created August 30, 2016 09:51
Framework7 + Messages + Socketio modified: https://framework7.io/docs/messages.html
var myApp = new Framework7();
var $$ = Dom7;
// Conversation flag
var conversationStarted = false;
// Init Messages
var myMessages = myApp.messages('.messages', {
autoLayout: true
@asleepysamurai
asleepysamurai / bootstrap.tooltip.js
Created October 29, 2012 07:32
Bootstrap tooltip plugin - modified to be rendered within the viewport and not runoff. Added a placement option 'auto' which determines the correct placement depending on viewport size. If suitable space is not available on any side of the element, then t
/* ===========================================================
* bootstrap-tooltip.js v2.1.1
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* 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