Skip to content

Instantly share code, notes, and snippets.

View abbood's full-sized avatar
💭
Leading Village.do tech team

Abdullah Bakhach abbood

💭
Leading Village.do tech team
View GitHub Profile
I'm using restangular 1.51 with angular 1.6. My html looks like this
<input type="file" name="file" />
and the angular code (based on the discussion [here][1]):
let directive = {
..
link: (scope, element, attrs) => {
@abbood
abbood / gist:89508959381e734dbb898fc90b930b0f
Created February 27, 2018 08:28
local command stacktrace
[0] Doctrine\DBAL\Driver\PDOConnection->__construct @ /Users/Shared/dev/php/toters-api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
[1] Doctrine\DBAL\Driver\PDOConnection->__construct @ /Users/Shared/dev/php/toters-api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
[2] Illuminate\Database\Connectors\PostgresConnector->createPdoConnection @ /Users/Shared/dev/php/toters-api/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:116
[3] Illuminate\Database\Connectors\PostgresConnector->createConnection @ /Users/Shared/dev/php/toters-api/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:56
[4] Illuminate\Database\Connectors\PostgresConnector->connect @ /Users/Shared/dev/php/toters-api/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php:36
[5] Phaza\LaravelPostgis\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure} @ /Users/Shared/dev/php/toters-api/vendor/laravel/framework/src/Illu
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "13a30960e435f31b1e570fb34dff2eac",
"content-hash": "02d706c39ad093f8921a13b3edc30b7d",
"packages": [
{
@abbood
abbood / www.conf
Created December 30, 2017 23:55
php-fpm.d/www.conf
; Start a new pool named 'www'.
; the variable $pool can be used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
@abbood
abbood / php-fpm.conf
Created December 30, 2017 23:54
php-fpm.conf
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
;;;;;;;;;;;;;;;;;;
; Global Options ;
@abbood
abbood / gist:eb559045a42eff99abf35274f2b915cb
Created November 24, 2017 07:34
verbose migration error
[Illuminate\Database\QueryException (23502)]
SQLSTATE[23502]: Not null violation: 7 ERROR: column "building_id" contains null values (SQL: ALTER TABLE addresses ALTER COLUMN building_id SET NOT NULL)
Exception trace:
() at /home/forge/default/vendor/laravel/framework/src/Illuminate/Database/Connection.php:770
Illuminate\Database\Connection->runQueryCallback() at /home/forge/default/vendor/laravel/framework/src/Illuminate/Database/Connection.php:726
Illuminate\Database\Connection->run() at /home/forge/default/vendor/laravel/framework/src/Illuminate/Database/Connection.php:481
Illuminate\Database\Connection->statement() at /home/forge/default/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:317
Illuminate\Database\DatabaseManager->__call() at /home/forge/default/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:237
// This constant is written in column C for rows for which an email
// has been sent successfully.
var EMAIL_SENT = "initial contact";
var GOT_CONTACT = "got contact"
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2; // First row of data to process
var numRows = 100; // Number of rows to process
// Fetch the range of cells A2:B3
@abbood
abbood / gist:77b34010b23ebdcaf4fec08b8620b649
Created November 14, 2017 06:00
incomplete cart json data
{
"errors":false,
"data":{
"orders":{
"total":9144,
"per_page":30,
"current_page":1,
"last_page":305,
"next_page_url":"http:\/\/production-load-balancer-661686363.eu-west-1.elb.amazonaws.com\/api\/orders?page=2",
"prev_page_url":null,
@abbood
abbood / debugger.py
Created November 10, 2017 13:28
debugger.py
# -*- c--oding: ko_KR.UTF-8 -*-
# remote PHP debugger : remote debugger interface to DBGp protocol
#
# Authors:
# Seung Woo Shin <segv <at> sayclub.com>
# Sam Ghods <sam <at> box.net>
# Hadi Zeftin <slack.dna <at> gmail.com>
"""
debugger.py -- DBGp client: a remote debugger interface to DBGp protocol
@abbood
abbood / debugger.vim
Created November 10, 2017 13:27
debugger.vim
" DBGp client: a remote debugger interface/client to the DBGp protocol
"
"=============================================================================
" Script Info and Documentation
"=============================================================================
" Name Of File: debugger.vim, debugger.py
" Description: remote debugger client/interface to DBGp protocol
" Maintainer: Hadi Zeftin <slack.dna <at> gmail.com>
" Last Change: January 7, 2009
" URL: http://www.vim.org/scripts/script.php?script_id=2508