Skip to content

Instantly share code, notes, and snippets.

View assertchris's full-sized avatar

Christopher Pitt assertchris

View GitHub Profile
Function.prototype.compile = function() {
var template = this.toString().split('\n').slice(1,-1).join('\n') + '\n';
return Ember.Handlebars.compile(template);
}
/*******************************************************/
test('sets first tab found to active', function() {
expect(2);
var component = this.subject({
@eridal
eridal / Compiler.java
Last active February 27, 2025 19:02
Java to PHP Compilation
package j2p;
import japa.parser.JavaParser;
import japa.parser.ParseException;
import japa.parser.ast.CompilationUnit;
import japa.parser.ast.ImportDeclaration;
import japa.parser.ast.PackageDeclaration;
import japa.parser.ast.body.BodyDeclaration;
import japa.parser.ast.body.ClassOrInterfaceDeclaration;
import japa.parser.ast.body.FieldDeclaration;
@JustSteveKing
JustSteveKing / State.php
Created August 11, 2023 18:31
US States as a PHP Enum
<?php
declare(strict_types=1);
namespace App\Enums;
enum State: string
{
case ALABAMA = 'AL';
case ALASKA = 'AK';