Skip to content

Instantly share code, notes, and snippets.

Lukas Kahwe Smith lsmith77

Block or report user

Report or block lsmith77

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
lsmith77 / diff
Created Oct 8, 2019
multi currency in Spark
View diff
diff --git a/resources/views/vendor/spark/auth/register-common.blade.php b/resources/views/vendor/spark/auth/register-common.blade.php
index 4c78546..30cd926 100644
--- a/resources/views/vendor/spark/auth/register-common.blade.php
+++ b/resources/views/vendor/spark/auth/register-common.blade.php
@@ -95,7 +95,7 @@
<span v-else class="table-plan-text">
- <strong class="table-plan-price">@{{ plan.price | currency }}</strong>
+ <strong class="table-plan-price">@{{ plan.price | currency(plan.attributes.currency, plan.attributes.currencyLocale) }}</strong>
View meetings.js
const data = require('../Downloads/Slack/diversity-inclusion/2019-03-07.json');
const usersExport = require('../Downloads/Slack/users.json');
// Load all users into memory.
const users = {};
const contributors = {};
usersExport.forEach(user => {
users[] = user.profile.display_name_normalized ? user.profile.display_name_normalized : user.profile.real_name_normalized;
lsmith77 / DoctrineMigrationTest.php
Last active Feb 23, 2019
PHPUnit functional test to check if migrations inside a Symfony app
View DoctrineMigrationTest.php
namespace AppBundle\Tests;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\DBAL\Driver\PDOMysql\Driver as MySQLDriver;
class DoctrineMigrationTest extends WebTestCase
View list of sane mimetypes for a "document" upload
- application/pdf
- application/x-pdf
- text/plain
- application/rtf
- image/*
- application/msword
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
View - gitlab autodeploy
# /dev/ci/
#!/usr/bin/env bash
which ssh-agent || (apt-get update -y && apt-get install openssh-client -y)
eval $(ssh-agent -s)
ssh-add <(echo "$PLATFORMSH_DEPLOY_KEY")
mkdir -p ~/.ssh
[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
lsmith77 / gist:6f352592b0a460fb0886f4cec82d51de
Created Feb 2, 2017
propel join with additional condition on a date
View gist:6f352592b0a460fb0886f4cec82d51de
// also tried using addJoinObject + addJoinCondition but either way the condition just gets ignored
$results = $this->getFooQuery()
->addCond(BarTableMap::COL_UPDATED_AT, $updatedAt->format('Y-m-d H:i:s'), Criteria::LESS_THAN)
View security_provider.php
$security_provider = getenv('SECURITY_PROVIDER');
if (empty($security_provider)) {
if ('dev' === getenv('APP_ENVIRONMENT')) {
$security_provider = 'chain_provider';
} else {
$security_provider = 'ldap';
View Onename
Verifying that +lsmith is my blockchain ID.
lsmith77 / gist:f1ab3fe12fb0813ba4f7
Created Jun 10, 2015
this compiler pass fails with "Unable to dump a service container if a parameter is an object or a resource."
View gist:f1ab3fe12fb0813ba4f7
namespace Liip\TranslationBundle\DependencyInjection\Compiler;
use Doctrine\ODM\PHPCR\Mapping\Annotations\Reference;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
* Compiler pass to dynamically set the service for isGrant checks (can be removed when requiring Symfony 2.6+
lsmith77 / Logitech R700 with reveal.js
Created Nov 2, 2014
Logitech R700 with reveal.js
View Logitech R700 with reveal.js
<?xml version="1.0"?>
<!-- Use with KeyRemap4MacBook: -->
You can’t perform that action at this time.