Skip to content

Instantly share code, notes, and snippets.

View IhwanID's full-sized avatar

Ihwan IhwanID

View GitHub Profile
@almeidx
almeidx / markdown-text-101.md
Last active June 2, 2024 19:46 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

let str: String? = "test"
// Optional binding using 'if'
if let value = str {
print(value)
}
// Optional binding using guard
guard let value = str else {
@caiozullo
caiozullo / Careful With “Singleton” Lookalikes episode.swift
Created November 12, 2018 10:55
Careful With “Singleton” Lookalikes episode
//
// Copyright © 2018 Essential Developer. All rights reserved.
//
import UIKit
/*
The Singleton design pattern is intended to enforce
a class has only one instance.
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Generation Time: Jul 26, 2018 at 07:44 AM
-- Server version: 5.7.21
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@boeledi
boeledi / shared_preferences.dart
Last active January 28, 2024 22:23
Sample to show a way of using the SharedPreferences in a build
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
List<String> _languages = <String>['de','en','es','fr','it','nl','pt'];
class TestPage extends StatefulWidget {
@override
_TestPageState createState() => _TestPageState();
@eugenebokhan
eugenebokhan / CGImage+Resize.swift
Last active April 11, 2024 21:28
UIImage + Resize
import CoreGraphics
import Accelerate
import CoreImage
import UIKit
extension CGImage {
public enum Error: Swift.Error {
case imageResizingFailed
case cgContextCreationFailed
@nafiesl
nafiesl / tahapan-pembuatan-website.md
Created June 30, 2018 01:27
Tahapan Pembuatan Website

Tahapan Pembuatan Website

Dalam mengerjakan suatu proyek website atau aplikasi berbasis web, kami (JasaWebsiteBanjarmasin.com) bagi dalam 4 tahap pengerjaan sejak persiapan hingga selesai. Ke empat tahap tersebut adalah:

1. Analisis

Dalam tahap ini, kami mempersiapkan pengerjaan proyek dengan terlebih dahulu melakukan inteview kepada klien. Yaitu untuk mendiskusikan apa saja hal atau fitur sistem yang ingin dituangkan ke dalam website atau aplikasi web yang ingin dibuat.

Kemudian hasil inteview tersebut kami buat menjadi sebuah konsep tertulis, untuk di-review atau dianalisis oleh klien. Analisis ini diperlukan sebagai feedback dari klien, apakah konsep yang kami buat sudah sesuai dengan harapan dan keinginan klien.

@cupnoodle
cupnoodle / delayedExpectation.swift
Created June 20, 2018 11:18
Swift unit test with delay to wait the UI to present
let alertExpectation = XCTestExpectation(description: "testAlertShouldAppear")
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: {
XCTAssertTrue(loginVC.presentedViewController is UIAlertController)
alertExpectation.fulfill()
})
wait(for: [alertExpectation], timeout: 1.5)
@edc0der
edc0der / ActivityIndicatorOverlay.swift
Last active December 17, 2023 13:37
iOS + Swift: Display activity indicator overlay - UIViewController extension
import UIKit
fileprivate let overlayViewTag: Int = 999
fileprivate let activityIndicatorViewTag: Int = 1000
// Public interface
extension UIView {
func displayAnimatedActivityIndicatorView() {
setActivityIndicatorView()
}
@MaskyS
MaskyS / main.dart
Last active November 25, 2022 05:35
An example showing how we can tap on a ListTile to open a PopUpMenuButton in Flutter.
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
// Title
title: "Example App",
// Home
home: new ListTileWithPopupMenuButton()
));
}