Skip to content

Instantly share code, notes, and snippets.

View sashabeep's full-sized avatar

Sasha Beep sashabeep

View GitHub Profile
@dhanangpratama
dhanangpratama / laravel-create-pagination-from-array-sample.php
Last active December 3, 2024 07:02
Create pagination from array data in laravel
<?php
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Http\Request;
class PaginationSample extends Controller
{
public function index(Request $request)
{
$data = ['Dhanang', 'Andi', 'Rudi', 'Anton'];
<?php
/* filter by TV of date format */
/* &filters=`tvdate:mytv:=:2017-09-28` */
include_once ('tv.filter.php');
/**
* Created by PhpStorm.
* User: Pathologic
* Date: 28.09.17
* Time: 13:09
*/
@moay
moay / imapsync.md
Last active June 29, 2023 05:51 — forked from dsoares/imapsync.md
Install and use imapsync in Mac OS X

Install and use imapsync in Mac OS X

brew install imapsync

Run (without ssl)

imapsync --host1 imap.from.server --user1 foo --password1 secret1 --host2 imap.dest.server --user2 bar --password2 secret2

Run (with ssl)

@webag
webag / send.php
Last active July 5, 2024 06:39
(Устарело - работать не будет) PHP Добавление контакта и сделки в amocrm с полями из формы сайта.
<?
//amo
//ПРЕДОПРЕДЕЛЯЕМЫЕ ПЕРЕМЕННЫЕ
$responsible_user_id = 7292136; //id ответственного по сделке, контакту, компании
$lead_name = 'Заявка с сайта'; //Название добавляемой сделки
$lead_status_id = '11331793'; //id этапа продаж, куда помещать сделку
$contact_name = $cname; //Название добавляемого контакта
$contact_phone = $cphone; //Телефон контакта
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@dopsmain
dopsmain / function.phpthumb.php
Created April 1, 2016 05:29
phpthumb for smarty
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*
* Smarty {phpthumb} function plugin
*
* Type: function<br>

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@argnist
argnist / msorderbyphonehandler.class.php
Created July 4, 2013 10:22
Minishop2 OrderHandler с привязкой к телефону вместо емейла
<?php
class msOrderByPhoneHandler extends msOrderHandler {
public function getCustomerId() {
$order = $this->ms2->order->get();
if (empty($order['phone'])) {return false;}
if ($this->modx->user->isAuthenticated()) {
$profile = $this->modx->user->Profile;
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;