Skip to content

Instantly share code, notes, and snippets.

View ajiehatajie's full-sized avatar

Ajie Hatajie ajiehatajie

  • JAKARTA
View GitHub Profile
@ajiehatajie
ajiehatajie / gist:9ae0aae99a432f56ca2e
Last active August 29, 2015 14:00
Report Bulanan OCA
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: NULL
-- Create date:
-- Description:
-- =============================================
ALTER PROCEDURE [dbo].[Report_OCA]
-- Add the parameters for the stored procedure here
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TelegramBotSharp;
using TelegramBotSharp.Types;
using MySql.Data.MySqlClient;
@ajiehatajie
ajiehatajie / album
Last active June 6, 2017 12:17
album
<form method="post" action="https://belajarmengajar.com/dashboard/album/add" id="allcp-form" enctype="multipart/form-data">
<input type="hidden" name="action" value="add">
<div class="form-horizontal">
<div class="row">
<div class="col-sm-6 form-group">
<label class="col-md-3 control-label">
Album untuk <em class="required">*</em>
</label>
<form action="https://belajarmengajar.com/contact" method="post">
<input class="c-input type-3" type="text" required="" name="model[name]" value="" placeholder="Nama lengkap">
<div class="empty-space marg-lg-b20"></div>
<input class="c-input type-3" type="email" required="" name="model[email]" value="" placeholder="Email">
<div class="empty-space marg-lg-b20"></div>
<input class="c-input type-3" type="text" required="" name="model[subject]" value="" placeholder="Topik">
@ajiehatajie
ajiehatajie / .php
Last active September 27, 2017 04:18
Model elequent
public function scopeListMonth($query,$param)
{
return $query->leftJoin("kecamatans","kecamatans.id","=","ktps.kecamatan_id")
->select(DB::raw("distinct (DATE_FORMAT(date_submission,'%M-%Y')) as date,
case status when 0 then 'Belum Jadi' else 'Sudah Jadi' end as status,name"))
->where("ktps.kecamatan_id","=",$param)->distinct()->paginate(10);
/*
manual query
/** * Created by f.putra on 6/22/17. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import {ViewPropTypes} from 'react-native'; import { Animated, Easing, View, } from 'react-native'; const ANIMATED_EASING_PREFIXES = ['easeInOut', 'easeOut', 'easeIn']; class Collapsible extends Component { static propTypes = { align: PropTypes.oneOf(['top', 'center', 'bottom']), collapsed: PropTypes.bool, collapsedHeight: PropTypes.number, duration: PropTypes.number, easing: PropTypes.oneOfType([ PropTypes.string, PropTypes.func, ]), style: ViewPropTypes.style, }; static defaultProps = { align: 'top', collapsed: true, collapsedHeight: 0, duration: 300, easing: 'easeOutCubic', }; componentWillReceiveProps(nextProps) { if (nextProps.collapsed !== this.props.collapsed) { this._toggleCollapsed(nextProps.collapsed); } else if (nextProps.collapsed && nextProps.collapsedHeight !== this.props.collapsedHeight) { this.state.height.setValue(nextProps.collapsedHeight); } } constructor(props) { super(prop
store/index.js
const GET_DATA = 'GET_DATA'
const API_ERROR = 'API_ERROR'
const API_URL = 'http://hatajieblog.dev/api/v1/'
export const state = () => ({
posts: []
})
export const actions = {
@ajiehatajie
ajiehatajie / ReactotronConfig.js
Created January 25, 2018 11:12
konfiguasi ReactToTron react native konsole log
import Reactotron, {
trackGlobalErrors,
openInEditor,
overlay,
asyncStorage,
networking
} from 'reactotron-react-native'
Reactotron
.configure({
@ajiehatajie
ajiehatajie / loginscreen.js
Created April 17, 2018 09:20
loginscreen
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
StyleSheet,View,TextInput,StatusBar,TouchableOpacity,Image,Alert,AsyncStorage
} from 'react-native'
import { Container, Header, Title,
Content, Footer, FooterTab, Button, Left, Right, Body,
Icon, Text,Item ,Input} from 'native-base';
import Api from '../services/Api';
@ajiehatajie
ajiehatajie / app.js
Created April 17, 2018 09:21
router root
import React, { Component } from 'react';
import { Text, StyleSheet,BackHandler,Alert,View,AsyncStorage,ActivityIndicator } from 'react-native';
import {
Scene,
Router,
Actions,
Reducer,
ActionConst,
Overlay,
Tabs,