Skip to content

Instantly share code, notes, and snippets.

View infacq's full-sized avatar

Muhaimin infacq

  • Seri Kembangan, Selangor Malaysia
View GitHub Profile
@unnikked
unnikked / index.php
Created January 5, 2016 22:02
InlineDuckBot
<?php
require("./vendor/autoload.php");
define('BOT_TOKEN', 'token');
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/');
function apiRequestWebhook($method, $parameters) {
if (!is_string($method)) {
error_log("Method name must be a string\n");
@orneryd
orneryd / gist:909fa5c66002d92f1506
Last active August 29, 2015 14:10
Marionette securedRouter
define([
'underscore',
'marionette'
], function(_, Marionette) {
'use strict';
/**
* SecureRouter
*
* This class is similar to the marionette Approuter except
@mattmezza
mattmezza / vhost.sh
Last active November 30, 2023 08:30
bash script to create virtual host vhost with apache httpd and CentOs 7
#!/bin/bash
# This script is used for create virtual hosts on CentOs.
# Created by alexnogard from http://alexnogard.com
# Improved by mattmezza from http://you.canmakethat.com
# Feel free to modify it
# PARAMETERS
#
# $usr - User
# $dir - directory of web files
# $servn - webserver address without www.
@marciopaiva
marciopaiva / centos7_ambiente_desenvolvimento.md
Last active April 1, 2022 18:05
CentOS 7 - Apache 2.4 + MOD_PROXY_FCGI + PHP-FPM 5.5 + InstantClient Oracle.

CentOS 7 - Apache 2.4 + PHP-FPM 5.5 + InstantClient Oracle.


Montando uma VM para o desenvolvimento de aplicações em PHP, utilizado o CentOS 7

@pwenzel
pwenzel / lamp-stack-osx-virtualhostx.md
Last active April 8, 2022 04:00
LAMP stack on OSX with Homebrew, built-in Apache, multiple PHP versions, VirtualhostX optional

This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.

VirtualHostX is a convenient way to manage development sites, but not required.

Install PHP and MySQL with Homebrew

brew update
brew install php56
brew install php56-mcrypt
brew install mysql
@christopher-hopper
christopher-hopper / vm-resize-hard-disk.md
Last active April 5, 2022 10:30
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@nedga055
nedga055 / example-usage.js
Last active March 25, 2016 14:37
Backbone Marionette View and Template for file uploads using Plupload. Requires Plupload (http://www.plupload.com/).
// Add this to the onRender() of the view you want to add your file upload to
// The options passed in will override the default Plupload options
// (http://www.plupload.com/documentation.php)
this.fileUploadView = new FileUploadView({
el: '#upload-container',
url: 'upload.php',
successMessage: 'Your file uploaded successfully.'
});
this.fileUploadView.render();
@jardix22
jardix22 / 1.html
Last active March 6, 2017 16:09 — forked from mxriverlynn/1.html
Modal Bootstrap 3 + Marionette.js
<script id="modal-view-template" type="text/html">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
@insaciableslabs
insaciableslabs / 1.html
Created August 28, 2013 17:55 — forked from mxriverlynn/1.html
Adaptation of Derick Bayley Notification Region to be used with Twitter Bootstrap and Backbone 1.0
<script id="modal-view-template" type="text/html">
<div class="modal-header">
<h2>This is a modal!</h2>
</div>
<div class="modal-body">
<p>With some content in it!</p>
</div>
<div class="modal-footer">
<button class="btn">cancel</button>
<button class="btn-default">Ok</button>
@bruth
bruth / README.md
Created April 27, 2012 00:51
sortedGroupBy using Underscore

sortedGroupBy

jsFiddle Example

Convenience function for performing a groupBy on a list then a sortBy on the resulting groups using Underscore methods.

sortedGroupBy(list, groupByIterator, sortByIterator)