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
@justinbmeyer
justinbmeyer / fastfix.js
Created April 13, 2012 14:17
Makes jQuery.event.fix fast
(function(){
var set = function(obj, prop, val){
Object.defineProperty(obj,prop,{
value : val
})
return val;
};
@Zodiac1978
Zodiac1978 / .htaccess
Last active August 15, 2024 18:00
Make your Website faster - a safe htaccess way
#
# Sources:
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites
# http://codex.wordpress.org/Output_Compression
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/
# http://gtmetrix.com/configure-entity-tags-etags.html
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress
# https://andreashecht-blog.de/4183/
@hakre
hakre / iteration-and-recursive-iteration.php
Created September 2, 2012 14:26
Iteration and Recursive Iteration Examples Code
<?php
/*
* Iteration and Recursive Iteration Examples Code
*
* @link http://stackoverflow.com/questions/12077177/how-does-recursiveiteratoriterator-works-in-php
* @author hakre <http://hakre.wordpress.com>
*/
### To have these examples to work, a directory with subdirectories is needed,
### I named mine "tree":
@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
@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
@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

// 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

🌆 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
@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:
@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';