Skip to content

Instantly share code, notes, and snippets.

View srph's full-sized avatar
🛠️
Building @Stride-Labs Frontend

Kier Borromeo srph

🛠️
Building @Stride-Labs Frontend
View GitHub Profile
@srph
srph / instruction.md
Last active October 13, 2017 12:09
Find a 9 letter string of characters that contains only letters from [acdegilmnoprstuw] such that the hash(the_string) is 910897038977002; If hash is defined with the given pseudo-code

Find a 9 letter string of characters that contains only letters from

acdegilmnoprstuw

such that the hash(the_string) is

910897038977002

if hash is defined by the following pseudo-code:

@srph
srph / gist:8af96e0b70d443ab8693
Created August 7, 2014 17:08
apiv1.coffeescript
app = require '../app'
app.constant 'APIv1', ->
api = {}
# Base (alias)
base = '/api/v1'
# Base
api.base = base
@srph
srph / states.js
Last active August 29, 2015 14:05
app.config(['$stateProvider', function($stateProvider) {
var auth = {
name: 'auth',
abstract: true,
template: '<div ui-view></div>',
resolve: {
auth: ['AuthSrvc', function(AuthSrvc) {
return AuthSrvc.check()
}]
@srph
srph / login.js
Last active August 29, 2015 14:05
Leading / on urls
app.config([
'$stateProvider',
function($stateProvider) {
var state = {
name: 'login',
url: '/login',
// resolve: {
// guest: ['AuthSrvc', function(AuthSrvc) {
// return AuthSrvc.guest();
// }]
@srph
srph / gist:f42e57c45173e4e8f11d
Created August 30, 2014 06:50
my-better-yet-qcs
Controller:
// calls repository
// repository calls its abstract parent
// abstract parent calls query / command
// has validabletrait (which valides itself with the given rules)
// abstract parent calls transformer
// return
// repository does it the eloquent way or mongo or whatever way
// repository returns transformed data
Controller:
// calls command / query
// has validabletrait (which valides itself with the given rules)
// command / query calls repository
// repository does the eloquent, mongo, or whatever way
// calls transformer
// returns a json response
app/
Core/
Common/
UserManagement/
Bindings/
Command/
Exceptions/
Queries/
Repositories/
Transformers/
@srph
srph / 1
Created September 4, 2014 03:41
laravel module structuring
- app/
- MyOwnNameSpace/
- Filters
- Controllers
- ..
- ..
- ..
- ..
- ..
- Models
@srph
srph / pogi.html
Created September 5, 2014 05:22
transfer txtarea1 to txtarea2 basilio
<html>
<head>
<title>PAHIRAP!</title>
</head>
<body>
<form>
Enter Code Here!<br>
<textarea class="code_input" rows="30" cols="50" id="code_input">
<?php
use Acme\Repositories\Interfaces\User as UserRepository;
class UserController extends BaseController {
// left blank for brevity
}