- coding frontend + test
- problem solving
- showcase logic, features, styles, etc
- ngopi
List
| // IDEA FROM: https://stackoverflow.com/questions/33929712/crypto-in-nodejs-and-ruby | |
| var crypto = require('crypto'), | |
| algorithm = 'aes-256-cbc', | |
| key = 'SOME_RANDOM_KEY_32_CHR_123456789', // 32 Characters | |
| iv = "0000000000000000"; // 16 Characters | |
| function encrypt(text){ | |
| var cipher = crypto.createCipheriv(algorithm,key,iv) | |
| var crypted = cipher.update(text,'utf-8',"base64") |
| user_gain = {} | |
| transactions.each do |t| | |
| # bere persenan user ke 1 yg diatas | |
| user_gain[user_gain_id_1] = [] if user_gain[user_gain_id_1].blank? | |
| user_gain[user_gain_id_1] << nilai transaksi * 0.2% | |
| # bere persenan user ke 2 yg diatas | |
| # get: user_gain_id_2 |
| Aptitude::Calculation.new({:R=>[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5], :I=>[2, 4, 4, 2, 2, 1, 1, 3, 1, 1, 3, 3, 2, 2, 3], :A=>[4, 2, 2, 1, 4, 2, 2, 2, 2, 1, 1, 3, 4, 2, 2, 4, 1, 4], :S=>[3, 2, 3, 3, 3, 1, 1, 4, 4, 2, 2, 3, 2, 1, 4, 4, 1, 1], :E=>[3, 4, 4, 2, 3, 4, 1, 4, 1, 3, 4, 3, 4, 4, 4, 3, 4], :C=>[3, 3, 2, 4, 1, 2, 3, 1, 1, 1, 3, 4, 4, 1, 4, 4], :EI=>[1, 1, 3, 2, 4, 3, 4, 1, 2, 1], :SN=>[3, 2, 2, 2, 2, 4, 2, 4], :TF=>[1, 4, 2, 2, 2, 2, 4, 4, 3, 1, 2], :KE=>[1, 3, 1, 3, 1, 2, 4, 3, 3, 1]}) |
| namespace :routes do | |
| desc 'Print out all defined routes in match order, with names, per constraint class. Target specific constraint class with CONSTRAINT=x. Target specific controller with CONTROLLER=x.' | |
| task constrained: :environment do | |
| Rails.application.reload_routes! | |
| constraints_routes = Hash.new | |
| Rails.application.routes.routes.each do |route| | |
| group = (route.app.class == ActionDispatch::Routing::Mapper::Constraints ? route.app.send( :constraints ).first.to_s : 'No constraint class') | |
| constraints_routes[group] ||= [] |
| server { | |
| listen 5500; | |
| server_name localhost; | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $remote_addr; | |
| proxy_set_header Host $host; | |
| proxy_pass http://localhost:5000; | |
| } |
| openssl req \ | |
| -newkey rsa:2048 \ | |
| -x509 \ | |
| -nodes \ | |
| -keyout localsite.key \ | |
| -new \ | |
| -out localsite.crt \ | |
| -subj /CN=\*.localsite.dev \ | |
| -reqexts SAN \ | |
| -extensions SAN \ |
| {"Lorem": "ipsum2"} | |
| {"dolor": "sit"} | |
| {"amet": "consectetur"} | |
| {"adipiscing": "elit"} | |
| {"Sed": "mattis"} | |
| {"justo": "at"} | |
| {"purus": "pulvinar"} | |
| {"varius": "Nullam"} | |
| {"eget": "magna"} | |
| {"eget": "lorem"} |
| var schedulesControllers = angular.module('schedulesControllers', []); | |
| schedulesControllers.controller('weekControllers', function($scope, $ionicHistory, $ionicLoading, schedulesService, $ionicSlideBoxDelegate, $interval, $filter, $state) { | |
| $ionicLoading.show({ | |
| content: 'Loading', | |
| animation: 'fade-in', | |
| showBackdrop: true, | |
| maxWidth: 200, | |
| showDelay: 0 | |
| }); |
| brew install ntfs-3g | |
| sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig | |
| sudo ln -s /usr/local/Cellar/ntfs-3g/2014.2.15/sbin/mount_ntfs /sbin/mount_ntfs | |
| The new osxfuse file system bundle needs to be installed by the root user: | |
| sudo /bin/cp -RfX /usr/local/opt/osxfuse/Library/Filesystems/osxfusefs.fs /Library/Filesystems/ | |
| sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs |