Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

David Davaham ddavaham

🎯
Focusing
  • United States
Block or report user

Report or block ddavaham

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:cae3f77b19e7d8df4debee5c862dd3ae
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
<?php
namespace SUN\Models\ESI;
use Illuminate\Database\Eloquent\Model;
class Type extends Model
{
...
public function skillz()
View gist:49f5c0c0d7c9c40ef61c05708a205b40
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
<?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
<?php
namespace SUN\Models\ESI;
use Illuminate\Database\Eloquent\Model;
use SUN\Models\{AccessList,CorporationWallet,Member,MailRecipient};
class Corporation extends Model
{
View Members.php
<?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
$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
// 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
# 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 ->
You can’t perform that action at this time.