Skip to content

Instantly share code, notes, and snippets.

View igroomgrim's full-sized avatar
🥶
Focusing

Anak Mirasing igroomgrim

🥶
Focusing
View GitHub Profile
@igroomgrim
igroomgrim / ScrollingStackView.swift
Created February 15, 2021 02:19 — forked from SintraWorks/ScrollingStackView.swift
A scrolling capable drop-in replacement for UIStackView.
//
// ScrollingStackView.swift
//
// Created by Antonio Nunes on 05/08/2018.
// Copyright © 2018 SintraWorks. All rights reserved.
//
// 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
@igroomgrim
igroomgrim / gist:095202c2455d0de10e93430968fb2827
Created January 22, 2021 03:53
Build Omise iOS SDK .xcframework
This workaround let we can build `OmiseSDK.xcframework` and just copy into your project
- **Environments**
- Xcode 12.3 (12C33)
- Swift 5.3.1
------------
- **Steps**
1. Download Omise SDK ([master](https://github.com/omise/omise-ios/archive/master.zip)) and extract into your PC
2. Open `Terminal` app and go to `omise-ios-sdk` folder
3. use `xcodebuild` archive SDK for simulator
@igroomgrim
igroomgrim / publickey-git-error.markdown
Created November 4, 2020 04:15 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
@igroomgrim
igroomgrim / DataObjects.swift
Created March 11, 2020 15:04 — forked from DagAgren/DataObjects.swift
Receiving web push notifications on iOS, using the toot-relay forwarder
import Foundation
struct PushNotification: Codable {
let accessToken: String
let preferredLocale: String
let notificationId: Int64
let notificationType: Type
let icon: URL
let title: String
let body: String
@igroomgrim
igroomgrim / Proposal.sol
Created March 30, 2018 09:01
Funny example for Thailand 0.4 Election system
pragma solidity ^0.4.18;
contract Proposal {
address public creator; // Candidate
string public manifesto;
modifier onlyCreator {
require(msg.sender == creator);
_;
}
@igroomgrim
igroomgrim / ThailandBollot.sol
Last active March 31, 2018 03:35
Funny example for Thailand 0.4 Election system
pragma solidity ^0.4.18;
import './ThailandMilitaryPower.sol';
import './Proposal.sol';
contract ThailandBollot is ThailandMilitaryPower {
struct Voter {
// This property should be hide :P
// uint8 voteToProposal;
bool voted;
@igroomgrim
igroomgrim / ThailandMilitaryPower.sol
Last active March 30, 2018 09:02
Funny example for Thailand 0.4 Election system
pragma solidity ^0.4.18;
import './Thailand.sol';
contract ThailandMilitaryPower is Thailand {
uint256 public curfewStartTime;
uint256 public curfewEndTime;
// Modifier
modifier whoHasATank() {
@igroomgrim
igroomgrim / Thailand.sol
Last active March 30, 2018 08:58
Funny example for Thailand 0.4 Election system
pragma solidity ^0.4.18;
import "zeppelin-solidity/contracts/math/SafeMath.sol";
contract Thailand {
using SafeMath for uint256;
address public owner;
address public primeMinister;
address public commanderInChief;

Videos

######################
# Options
######################
REVEAL_ARCHIVE_IN_FINDER=false
FRAMEWORK_NAME="${PROJECT_NAME}"
SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"