Skip to content

Instantly share code, notes, and snippets.

@iforwms
iforwms / .htaccess
Created April 24, 2017 10:40 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@iforwms
iforwms / fix adb
Created February 14, 2018 10:58 — forked from jokamjohn/fix adb
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address
E:\SDK\platform-tools>adb.exe start-server
^C
E:\SDK\platform-tools>adb nodaemon server
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)
E:\SDK\platform-tools>netstat -aon|findstr 5037
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 9904
TCP 127.0.0.1:5037 127.0.0.1:49156 ESTABLISHED 9904
@iforwms
iforwms / sublime-text-scopes.md
Created June 29, 2018 02:07 — forked from J2TEAM/sublime-text-scopes.md
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@iforwms
iforwms / .htaccess
Created August 14, 2018 07:46 — forked from alexsasharegan/.htaccess
Apache Config for React Router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@iforwms
iforwms / homestead-manual-install.md
Created March 20, 2020 05:54 — forked from idecardo/homestead-manual-install.md
Laravel Homestead Manual Installation

Getting Started

Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server, and any other server software on your local machine. Read more...

Download

Download homestead box:

@iforwms
iforwms / calculate_reading_time.php
Created March 26, 2020 02:25 — forked from tomhazledine/calculate_reading_time.php
Calculate Reading Time (for WordPress content)
<?php
/**
* READING TIME
*
* Calculate an approximate reading-time for a post.
*
* @param string $content The content to be measured.
* @return integer Reading-time in seconds.
*/
function reading_time( $content ) {
@iforwms
iforwms / creative-cloud-disable.md
Created January 4, 2021 01:12 — forked from andreibosco/creative-cloud-disable.md
disable creative cloud startup on mac