Skip to content

Instantly share code, notes, and snippets.

View ihsanberahim's full-sized avatar
💭
focusing on the strong base for long term

Muhammad Nur'Ihsan Bin Berahim ihsanberahim

💭
focusing on the strong base for long term
View GitHub Profile
@rotten77
rotten77 / install.md
Last active May 5, 2023 10:24
LAMPP on Windows with Cygwin

LAMP on Windows with Cygwin

You can run your "LAMP" server on Windows with all benefits of Linux command line.

Cygwin packages:

Download Cygwin and run setup. Choose this packages:

Web/httpd

Libs/libapr1-devel

@shawnlindstrom
shawnlindstrom / TwilioServiceProvider.php
Created July 4, 2018 03:00
Twilio Service Provider for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Twilio\Rest\Client as TwilioService;
class TwilioServiceProvider extends ServiceProvider
{
public function register()
@brunogaspar
brunogaspar / macro.md
Last active May 1, 2024 07:24
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup

@valeryan
valeryan / README.md
Last active August 9, 2023 10:19
WSL Startup Script

USAGE

  1. Save the services.sh file to your computer in a location like C:/tools/wsl-startup/.
  2. Download the WSL Statup.xml and import it into Task Scheduler.
  3. Modify as needed for you personal use.
@tzmartin
tzmartin / embedded-file-viewer.md
Last active May 1, 2024 14:41
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@JJediny
JJediny / gist:a466eed62cee30ad45e2
Created October 5, 2015 20:42
Jekyll Liquid Cheatsheet

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by
@bekarice
bekarice / wc-disable-any-repeat-purchase.php
Last active July 26, 2023 12:19
Disables Repeat Purchase for any WooCommerce product
<?php
/**
* Disables repeat purchase for products / variations
*
* @param bool $purchasable true if product can be purchased
* @param \WC_Product $product the WooCommerce product
* @return bool $purchasable the updated is_purchasable check
*/
function sv_disable_repeat_purchase( $purchasable, $product ) {
@pitpit
pitpit / mailcatcher-install.md
Last active November 21, 2022 04:45
Install Mailcatcher on OSX - works well with macOS Sierra High 10.12.X

05/25/2018: tested with macOS Sierra High 10.12.6

08/04/2020: added @mayesa's suggestion to fix an exception with EventMachine 08/04/2020: tested with macOS Catalina 10.15.5

Install MailCatcher:

brew install ruby
sudo gem install mailcatcher
@tobi-pb
tobi-pb / migrate.sh
Last active March 3, 2023 23:34
Upgrade MAMP to Mysql 5.6
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.tar.gz
tar xfvz mysql-5.6*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "creating backup"