Skip to content

Instantly share code, notes, and snippets.

View balitax's full-sized avatar
🏠
Working from home

Agus Cahyono balitax

🏠
Working from home
View GitHub Profile

This uses Twitter Bootstrap classes for CodeIgniter pagination.

Drop this file into application/config.

@balitax
balitax / blogspot-list.php
Created June 30, 2016 04:53 — forked from arbo77/blogspot-list.php
Blogspot content parser using PHP CUrl, last update using Google Blogger API
<?php
/*
* read more on :
* https://developers.google.com/blogger/docs/3.0/getting_started
*
*/
$key["server"] = "YOUR_BLOGGER_API_KEY";
$blogId = "YOUR_BLOG_API";
@balitax
balitax / APIManager.swift
Last active September 13, 2018 04:57
APIManager.swift
//
// ApiManager.swift
// DOTAPI
//
// Created by Agus Cahyono on 16/04/18.
// Copyright © 2018 Agus Cahyono. All rights reserved.
//
import Foundation
import Alamofire
@balitax
balitax / APIEnvironment.swift
Last active September 3, 2018 03:46
APIEnvironment.swift
//
// APIEnvironment.swift
// DOT APIEnvironment
//
// Created by Agus Cahyono on 07/08/18.
// Copyright © 2018 Agus Cahyono. All rights reserved.
//
import Foundation
// The MIT License (MIT)
//
// Copyright (c) 2015 Isuru Nanayakkara
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@balitax
balitax / fibonacci.swift
Created October 18, 2019 14:37
Fibonacci Swift
import Foundation
func fibonacci(_ number: Int) -> [Int] {
var fibonacci = [Int]()
for n in 0...number {
if n == 0 {
fibonacci.append(0)
@balitax
balitax / counting_1_digit.swift
Created October 18, 2019 15:03
Count a number into 1 digit value
import Foundation
import UIKit
var number = 55555
// means 5+5+5+5+5 = 30 , so 3+0 = 3
func countDigits(_ digit: Int) -> Int {
var nums = digit
func layoutSection() -> NSCollectionLayoutSection {
var setWidthColumn: CGFloat = 0
var setHeight: CGFloat = 0
if column == 2 {
setWidthColumn = 0.5
setHeight = 0.75
} else if column == 3 {
setWidthColumn = 0.33
setHeight = 0.5