Skip to content

Instantly share code, notes, and snippets.

View cemeng's full-sized avatar
💭
aw yis

Felix Tjandrawibawa cemeng

💭
aw yis
View GitHub Profile
@cemeng
cemeng / affirmation
Created May 22, 2017 23:32
MuleSoft Contributor Agreement Acceptance by Felix Tjandrawibawa
I, Felix Tjandrawibawa, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Tue May 23 2017 09:32:13 GMT+1000 (AEST)
@cemeng
cemeng / renderForgotPassword.js
Created April 10, 2017 06:16
Forgot password
<script type='text/javascript'>
var renderForgotPasswordSuccessScreen = function(_eventObj) {
gigya.accounts.switchScreen({
'containerID': 'forgot-password',
'screenSet': '<%= @channel.gigya_authentication_screenset %>',
'screen': 'gigya-forgot-password-success-screen'
});
}
var errorMessages = {
@cemeng
cemeng / datastore.md
Last active March 29, 2017 04:23
Writing to Data Store

Connection information from member.data.connection (in account profile)

{
  connection: {
    login: {
      timestamp: '2017-03-29T02:54:26.750Z',
      siteId: 'iMmv-tD9dswv71XMEBeJgQ',
      device: {
        os: 'Macintosh 10.11.6',
        browser: 'Chrome',
@cemeng
cemeng / passwordHandler.js
Created March 22, 2017 04:45
Reset password handler
<script type='text/javascript'>
var resetPasswordHandler = new function() {
var that = this;
this.passwordResetSuccess = true;
this.errorCode = null;
this.errorDetails = null;
this.onError = function(eventObj) {
that.errorCode = eventObj.response.info.response.errorCode;
that.errorDetails = eventObj.response.info.response.errorDetails;
@cemeng
cemeng / rubocop-diff.rb
Created August 17, 2016 05:55
Run rubocop on files that changed between 2 revisions
unless (ARGV[0] && ARGV[1])
puts "Please specify base revision and end revision, eg: rubocop-diff.rb HEAD 8234531"
exit
end
files = `git diff --name-only #{ARGV[0]} #{ARGV[1]}`.split("\n").join(" ")
puts `rubocop #{files}`
CREATE TABLE `patient` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`version` bigint(20) NOT NULL,
`adaptation_to_loss` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`age` int(11) NOT NULL,
`age_care_facility_address_id` bigint(20) DEFAULT NULL,
`age_care_facility_building_name` varchar(255) DEFAULT NULL,
`age_care_facility_name` varchar(255) DEFAULT NULL,
`age_care_facility_other` varchar(255) DEFAULT NULL,
@cemeng
cemeng / gist:92d8ad62fb69daa9cb8c
Last active November 26, 2015 03:53
Distributing electron app
https://github.com/atom/grunt-electron-installer -> from atom people - needing the use of grunt
on Mac: You must install both Mono and Wine on non-Windows"
ok then:
brew install wine
brew install mono
Why bring grunt to the fold?
https://github.com/maxogden/electron-packager -> looks like most widely used, but needing wine?
https://github.com/loopline-systems/electron-builder -> built on top of packager - looks really nice, but still WIP
Install JDK?
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Install Grails?
https://grails.org/download.html -> use sdkman to install grails on macosx
sdk install grails 2.3.6 -> 2.3.6 is the one used on the project
No need to install Groovy -> included by Grails
Use IntelliJ?
@cemeng
cemeng / playbook.yml
Last active August 29, 2015 14:25
Ansible Ruby on Linux
---
- hosts: upsydaisy
vars:
project: activsky
admin_user: felixt
project_user: activsky
ruby_compiler: ruby
ruby_version: 2.1.1
install_ruby: false
remote_user: root
@cemeng
cemeng / gist:6a1cb617581f7b71f47f
Last active August 29, 2015 14:25
angular-ui modal implemented with angular-strap modal
.factory "Modal", ($modal, $q) ->
open: (options) ->
deferred = $q.defer()
modal = {}
options.locals =
$modalInstance:
hide: ->
modal.hide()
close: (result) ->