Skip to content

Instantly share code, notes, and snippets.


Arman Shahinyan texeltexel2009

View GitHub Profile
gbraad /
Last active Jun 17, 2021
Buy Me a Coffee

Buy Me a Coffee

Using inlined HTML

Buy Me A Coffee

<a href="" target="_blank"><img src="" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
ashblue / docker-compose.mongo.yml
Created Jan 6, 2018
Docker Compose example for MongoDB databases. Includes named volume support.
View docker-compose.mongo.yml
version: '3'
image: mongo:3.6.1
container_name: uv-mongodb
- mongodb:/data/db
- mongodb_config:/data/configdb
- 27017:27017
hassanazimi / .htaccess
Last active Mar 8, 2021
The Best .htaccess with browser caching and gzip
View .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
lgg / Make WordPress to use protocol relative urls
Created Jun 7, 2016
Make WordPress to use protocol relative urls
View Make WordPress to use protocol relative urls
//make other links relative
add_filter ('site_url', 'wp_make_theme_links_protocols_relative');
add_filter ('get_option_siteurl', 'wp_make_theme_links_protocols_relative');
add_filter ('stylesheet_directory_uri', 'wp_make_theme_links_protocols_relative');
add_filter ('template_directory_uri', 'wp_make_theme_links_protocols_relative');
add_filter ('wp_get_attachment_url', 'wp_make_theme_links_protocols_relative');
add_filter ('wp_get_attachment_thumb_url', 'wp_make_theme_links_protocols_relative');
add_filter ('the_permalink', 'wp_make_theme_links_protocols_relative');
function wp_make_theme_links_protocols_relative( $link ){
$link = str_replace("http://", "//", $link);

##Team Dropdown for Laravel Spark

Maybe you want a way for users to quickly jump to team settings?

Can be placed anywhere, try it out on user-right.blade.php Laravel Spark Team Dropdown

<?php $currentTeam = auth()->user()->currentTeam; ?>
View countdown-redirect.html
<!-- Modify this according to your requirement -->
Redirecting to after <span id="countdown">10</span> seconds
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;
xdamman /
Created Jul 2, 2014
Install latest ffmpeg on ubuntu 12.04 or 14.04
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
elidickinson / max_width_email.html
Created May 6, 2013
Email Template trick: max-width with outlook
View max_width_email.html
<!--[if mso]>
<table><tr><td width="580">
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
<!--[if mso]>
ScottPhillips / .htaccess
Created Feb 2, 2012
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /