Skip to content

Instantly share code, notes, and snippets.

View texeltexel2009's full-sized avatar
🎯
Focusing

Arman Shahinyan texeltexel2009

🎯
Focusing
View GitHub Profile
@lgg
lgg / Make WordPress to use protocol relative urls
Created June 7, 2016 03:29
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; ?>
@ashblue
ashblue / docker-compose.mongo.yml
Created January 6, 2018 23:31
Docker Compose example for MongoDB databases. Includes named volume support.
version: '3'
services:
mongodb:
image: mongo:3.6.1
container_name: uv-mongodb
volumes:
- mongodb:/data/db
- mongodb_config:/data/configdb
ports:
- 27017:27017
@BusterNeece
BusterNeece / 00-setup.md
Last active August 12, 2022 04:32
My WSL2 Ubuntu 20.04 Environment

My local Ubuntu 20.04 WSL2 setup.

Enable and Install WSL2

From Windows, as admin:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
<!-- Modify this according to your requirement -->
<h3>
Redirecting to duckdev.com after <span id="countdown">10</span> seconds
</h3>
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;
@azimidev
azimidev / .htaccess
Last active August 19, 2023 05:53
The Best .htaccess with browser caching and gzip
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# 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
@texeltexel2009
texeltexel2009 / .vimrc
Last active February 1, 2024 09:04
Vim personalization file
" Mouse support
set mouse=a
set ttymouse=sgr
set balloonevalterm
" Styled and colored underline support
let &t_AU = "\e[58:5:%dm"
let &t_8u = "\e[58:2:%lu:%lu:%lum"
let &t_Us = "\e[4:2m"
let &t_Cs = "\e[4:3m"
let &t_ds = "\e[4:4m"
@gbraad
gbraad / README.md
Last active February 27, 2024 21:11
Buy Me a Coffee

Buy Me a Coffee

Using inlined HTML

Buy Me A Coffee

<a href="https://www.buymeacoffee.com/gbraad" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" 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>
@jakebellacera
jakebellacera / ICS.php
Last active March 11, 2024 05:12
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*