Skip to content

Instantly share code, notes, and snippets.


Sam Stenvall Jalle19

  • Nitor Creations Oy
  • Helsinki
View GitHub Profile
View gist:60532513bbcec2fa630a9d8b576d91e3
# NOTE: "foreground = yes" must be added to the configuration file
ExecStart=/usr/local/bin/stunnel /etc/stunnel/stunnel.conf
View null.php
function printUser(string $name, int $age): string {
// $name == null never happens
// $age == null never happens
return sprintf('%s is %d years old', $name, $age);
echo printUser('Sam', 30);
View hath.service
Description=Hentai at Home
ExecStart=/usr/bin/java -jar HentaiAtHome.jar
Jalle19 / GraphQLService.php
Created May 15, 2019
Example of advanced graphql-php usage
View GraphQLService.php
namespace Foo\Bar\GraphQL;
use Digia\GraphQL\Error\Handler\ErrorHandlerInterface;
use Digia\GraphQL\Error\InvariantException;
use Digia\GraphQL\Execution\ExecutionResult;
use Digia\GraphQL\Language\Node\DocumentNode;
use Digia\GraphQL\Language\ParserInterface;
use Digia\GraphQL\Language\Source;
Jalle19 / createSelectionSetAppendingTransform.js
Created Dec 21, 2018
View createSelectionSetAppendingTransform.js
import { WrapQuery } from 'graphql-tools'
import { SelectionSetNode, Kind } from 'graphql'
* Creates a WrapQuery schema transform that appends the specified field to the selection set of the
* specified parent field name. This can be used to assure queries used by dataloader include the
* field used to align the results (usually some "id" field)
* @param parentFieldName
* @param appendedFieldName
Jalle19 /
Created Sep 5, 2018
Figure out which changes affected the bundle size the most
git log --oneline --pretty=format:"%h" yarn.lock | head -n 30 > last30_yarn_lock_commits.txt
while read REVISION; do
git show --oneline --quiet $REVISION
git checkout -f $REVISION
rm -rf node_moduels/
yarn install --production
View dyfi-update.service
[Unit] update daemon
ExecStart=/usr/local/bin/ -f /usr/local/etc/dyfi-update.conf

Keybase proof

I hereby claim:

  • I am Jalle19 on github.
  • I am jalle19 ( on keybase.
  • I have a public key whose fingerprint is 6F98 3459 3C27 57E0 A056 3FB2 3BDA 639B 71C9 CD3F

To claim this, I am signing this object:

View CListView_nojs.patch
# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\wamp\www\nsm
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: framework/zii/widgets/CListView.php
--- framework/zii/widgets/CListView.php Base (BASE)
+++ framework/zii/widgets/CListView.php Locally Modified (Based On LOCAL)
@@ -191,34 +191,33 @@