Skip to content

Instantly share code, notes, and snippets.

View iSWORD's full-sized avatar
🌙

Muha Ajjan iSWORD

🌙
View GitHub Profile
@levantoan
levantoan / Fix_vc.php
Last active January 29, 2025 14:32
Fix $template.get is not a function in VC when updated WordPress to 4.5
<?php
/*
Find html2element in
Version < 4.8: /wp-content/plugins/js_composer/assets/js/backend/composer-view.js
Version > 4.9: wp-content/plugins/js_composer/assets/js/dist/backend-actions.min.js
*/
html2element: function(html) {
var attributes = {},
$template;
if (_.isString(html)) {
# Set composer folder for this command and update
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
option_settings:
# Add environment variable to set composer home folder
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
<?php
///////////////////////////////////////////////////
// STEP 1 - CREATE CLASS THAT WILL BE USED GLOBALY
///////////////////////////////////////////////////
namespace App\MyApp;
class MyApp {
public function sayHello($data = [])
{
echo "Hello World from Facade!";
}
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active May 7, 2025 21:36
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active February 10, 2025 02:48
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@quentin23soleil
quentin23soleil / screen.sh
Created August 7, 2015 09:28
Take screenshot with demo mode on Android
#!/bin/bash
adb=your/android/sdk/path/platform-tools/adb
folder=.
$adb shell am broadcast -a com.android.systemui.demo --es command enter
$adb shell am broadcast -a com.android.systemui.demo --es command clock --es hhmm 0520
$adb shell am broadcast -a com.android.systemui.demo --es command battery --es level 100 --es plugged false
$adb shell am broadcast -a com.android.systemui.demo --es command network \
--es mobile show \
--es fully true \
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 13, 2025 15:10
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@derhansen
derhansen / removeJobsRedisDriver.php
Last active November 10, 2022 17:17
Laravel 5 - remove all jobs from a queue (redis driver)
Redis::connection()->del('queues:myqueue');
@MindyPostoff
MindyPostoff / gist:c70dc98a099a9bf1c2f0
Last active June 15, 2021 21:58
Reorder Display of Fields on WooCommerce Bookings Form
/**
* A function to reorder the default display of fields on the WooCommerce Bookings form
* Put this function in your theme's functions.php file
*/
function custom_order_booking_fields ( $fields ) {
$reorder = array();
$reorder[] = $fields['wc_bookings_field_duration']; // Duration
$reorder[] = $fields['wc_bookings_field_resource']; // Resource
$reorder[] = $fields['wc_bookings_field_persons']; // Persons