Skip to content

Instantly share code, notes, and snippets.

L L alpha1125

  • Toronto, Ontario, Canada
Block or report user

Report or block alpha1125

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
@alpha1125
alpha1125 / gist:42810c2433401d173227254bbfb94cbe
Created Dec 14, 2018
Arduino 1.8.8, https://github.com/prusa3d/Prusa-Firmware master. with two line changes. Line changes aren't the problem.
View gist:42810c2433401d173227254bbfb94cbe
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/lloydleung/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/lloydleung/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/lloydleung/Documents/Arduino/libraries -fqbn=rambo:avr:rambo -ide-version=10808 -build-path /var/folders/zw/919kfbjd28vb3yx642z5st6m0000gn/T/arduino_build_22011 -warnings=none -build-cache /var/folders/zw/919kfbjd28vb3yx642z5st6m0000gn/T/arduino_cache_418922 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/C
View gist:ccee6e8bfb6a4b9b6f515402c0720180
--(1755:Sun,11 Nov 18:$ )-- composer -vv install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Dependency resolution completed in 0.001 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove symfony/symfony v3.4.18
- don't install symfony/symfony v3.4.18|remove symfony/templating v4.1.7
View gist:b84c75f860a82c87cd857b9b0fdb73f0
--(1754:Sun,11 Nov 18:$ )-- composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-http * is missing from your system. Install or enable PHP's http extension.
@alpha1125
alpha1125 / SquareCropApprovalRequiredSubscriber.php
Created Dec 24, 2017
Cannot get the User, from TokenStorage
View SquareCropApprovalRequiredSubscriber.php
<?php
namespace ContestEngineBundle\Service\EventSubscriber;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\EventSubscriber;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
class SquareCropApprovalRequiredSubscriber implements EventSubscriber
@alpha1125
alpha1125 / Doctrine2-oneToMany.php
Created Nov 1, 2017
Create one to many relationship, this is a template, to generate the code needed to make oneToMany relationships. Change $A and $B accordingly.
View Doctrine2-oneToMany.php
<?php
$A = 'Product';
$B = 'Feature';
echo <<< EOD
<pre>
View gist:723921da68749328c751f1aae78f4d52
<?php
$criteria = Criteria::create()->where(Criteria::expr()->eq("id", $listId));
$desiredList = $property->getLists()->matching($criteria);
## $desiredList is an empty ArrayCollection()
## The following works:
View blink.c
@alpha1125
alpha1125 / excelMergeContents.vba
Last active Jan 16, 2017
Excel subroutine to merge the cells AND contents of the select range.
View excelMergeContents.vba
' This excel subroutine that will merge the contents of a selected range,
' concantenate and move all the contents into into the top cell.
'
' keywords: merge, cell, concatenate, join, range, selection
'
' The MIT License (MIT)
' Copyright (c) 2016 Lloyd Leung
'
' Permission is hereby granted, free of charge, to any person obtaining a
' copy of this software and associated documentation files (the "Software"),
View chat-frontend.js
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@alpha1125
alpha1125 / gist:10133064
Created Apr 8, 2014
VBA word, to convert linked images to embedded.
View gist:10133064
Sub convert_all_inline_shapes()
Dim s As InlineShape
For Each s In ActiveDocument.InlineShapes
If s.Type = wdInlineShapeLinkedPicture Then
' use debug print to get a list of images converted.. not necessary though...
Debug.Print s.Type & " <>"
s.LinkFormat.SavePictureWithDocument = True
s.LinkFormat.Update
You can’t perform that action at this time.