View gist:b9878bcf03705ab96b10c55bf28bd49d
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
Hi CCP |
View gist:cae3f77b19e7d8df4debee5c862dd3ae
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
CREATE TABLE `types` ( | |
`id` INT(10) UNSIGNED NOT NULL, | |
`name` VARCHAR(255) NOT NULL COLLATE 'utf8_unicode_ci', | |
`description` TEXT NULL COLLATE 'utf8_unicode_ci', | |
`published` TINYINT(1) NOT NULL DEFAULT '0', | |
`group_id` INT(10) UNSIGNED NOT NULL DEFAULT '0', | |
`market_group_id` INT(10) UNSIGNED NULL DEFAULT NULL, | |
`volume` DOUBLE(12,4) NOT NULL DEFAULT '0.0000', | |
`price` DOUBLE(15,4) NOT NULL, | |
`packaged_volume` DOUBLE(13,4) NULL DEFAULT NULL, |
View type.php
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 SUN\Models\ESI; | |
use Illuminate\Database\Eloquent\Model; | |
class Type extends Model | |
{ | |
... | |
public function skillz() |
View gist:49f5c0c0d7c9c40ef61c05708a205b40
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
foreach ($killmails as $killId=>$kill) { | |
$bpk = 0; | |
if ($adjustments->has('character')) { | |
if ($adjustments->get('character')->has($kill->character_id)) { | |
$bpk += $adjustments->get('character')->get($kill->character_id); | |
} | |
} | |
if ($adjustments->has('corporation')) { | |
if ($adjustments->get('corporation')->has($kill->corporation_id)) { |
View Character.php
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 SUN\Models\ESI; | |
use Illuminate\Database\Eloquent\Model; | |
use SUN\Models\{Member, AccessList}; | |
use SUN\Models\SDE\{Ancestry, Bloodline, Race}; | |
class Character extends Model |
View Corporation.php
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 SUN\Models\ESI; | |
use Illuminate\Database\Eloquent\Model; | |
use SUN\Models\{AccessList,CorporationWallet,Member,MailRecipient}; | |
class Corporation extends Model | |
{ |
View Members.php
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 SUN\Models; | |
use SUN\Traits\HasPermissionsTrait; | |
use Illuminate\Notifications\Notifiable; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
use SUN\Models\ESI\{Character, Contract, MailHeader, MailingList, Station, Structure, Type}; |
View gist:29e13e115fe541e0fe7a3ebf797a6313
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
$tidy = tidy_parse_string($testString, [ | |
'doctype' => "omit", | |
'show-body-only' => true | |
]); | |
$dom->loadHtml($tidy->value, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); | |
foreach ($dom->getElementsByTagName('font') as $anchor) { | |
if ($anchor->hasAttribute('size')) { | |
$anchor->removeAttribute('size'); | |
} | |
if ($anchor->hasAttribute('color')) { |
View dfsasfdfasdfas
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
// remove font size | |
$formattedMessage = preg_replace('/size="[^"]*[^"]"/', "", $reponse->body); | |
// remove wrong color | |
$formattedMessage = preg_replace('/(color="#)[a-f0-9]{2}([a-f0-9]{6}")/', '', $formattedMessage); | |
// link to kms | |
$formattedMessage = preg_replace('/<a href="killReport:(\d+):(\w+)">/', '<a href="' . config('base.kmUrl') . 'kill/\1/" target="_blank">', $formattedMessage); | |
// link fits | |
$formattedMessage = preg_replace('/<a href="fitting:([\d:;]+)">/', '<a href="' . config('base.osmiumUrl') . 'loadout/dna/\1" target="_blank">', $formattedMessage); | |
// link system/station | |
$formattedMessage = preg_replace('/<a href="showinfo:(?:5|3867)\/\/(\d+)">/', '<a href="' . config('base.dotlanUrl') . 'search?q=\1">', $formattedMessage); |
View init.coffee
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
NewerOlder