This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Document extends Model | |
{ | |
protected $guarded = ['id']; | |
public $timestamps = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Publication extends Model | |
{ | |
protected $guarded = ['id']; | |
protected $casts = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Core\Memory; | |
use Core\Session; | |
require_once dirname(dirname(__FILE__)) . '/private/bootstrap.php'; | |
header("Content-Type: text/plain"); | |
session_start(); | |
/** @var Memory $mem */ | |
/** @var Session $sess */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3272 : USERNAME_DUPLICATE : {"Comp_CompanyId"=>22873, "Comp_IdCust"=>"1902162 ", "Pers_PersonId"=>22888, "comp_orgtype"=>"Member", "Comp_Status"=>"Active", "Comp_Type"=>"Customer ", "comp_membertier"=>"FFT", "comp_district"=>nil, "comp_cpadivisions"=>nil, "Pers_LastName"=>"Munro", "Pers_FirstName"=>"Jeffrey", "Pers_MiddleName"=>"D.", "Pers_Salutation"=>"Mr.", "Pers_Title"=>"", "Pers_EmailAddress"=>"[email protected]", "Pers_Gender"=>"Male ", "pers_language"=>"US", "comp_language"=>"US", "pers_birthlastname"=>"", "Pers_PhoneAreaCode"=>"709", "Pers_PhoneCountryCode"=>nil, "Pers_PhoneNumber"=>"466-5235", "pers_birthday"=>1978-01-09 00:00:00 UTC, "Addr_Address1"=>"130", "Addr_Address2"=>"Harbour Dr", "Addr_Address3"=>"", "Addr_Address4"=>"", "Addr_City"=>"Clarenville", "Addr_State"=>"NL", "Addr_PostCode"=>"A5A 4J4", "Addr_Country"=>"CA", "pers_webusername"=>"[email protected] ", "pers_webpasswor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from fabric.api import * | |
from fabric.context_managers import lcd | |
from fabric.contrib.project import rsync_project | |
@task | |
def build(composer_extra=""): | |
with lcd('src/private'): | |
local("composer install %s" % composer_extra) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* (C) Copyright 2015 76design Inc (https://76design.com) and others. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$AS_ARRAY = true; | |
$files = glob('*.json'); | |
foreach($files as $fname) { | |
echo $fname . PHP_EOL; | |
$json_data = file_get_contents($fname); | |
$json_obj = json_decode($json_data, $AS_ARRAY); | |
$fp = fopen(basename($fname, '.json') . '.csv', 'w'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set realname = "Scott Burlington" | |
set from = "[email protected]" | |
set imap_user = "[email protected]" | |
set imap_pass = "XXX" | |
set smtp_url = "smtp://[email protected]@smtp.gmail.com:587/" | |
set smtp_pass = "XXX" | |
set folder = imaps://imap.gmail.com/ | |
set spoolfile = "+INBOX" | |
set postponed = "+[Gmail]/Drafts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl http://i.cdn.turner.com/si/pr/subs/swimsuit/images/13/13_cintia-dicker_[01-30].jpg -o cintia-2013-#1.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MAHOUT_LOCAL=1 # skip hadoop for now | |
K=3 | |
set -ex | |
mahout seqdirectory -i issblog -o issblog-seqfiles -ow | |
#-filter org.apache.lucene.analysis.en.EnglishMinimalStemFilter | |
#-filter org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter |