Skip to content

Instantly share code, notes, and snippets.

View speaktoalvin's full-sized avatar

Alvin speaktoalvin

View GitHub Profile
@speaktoalvin
speaktoalvin / DappToken.sol
Created March 2, 2021 06:34 — forked from gwmccubbin/DappToken.sol
DApp ERC-20 Token
pragma solidity ^0.5.0;
contract Token {
string public name = "DApp Token";
string public symbol = "DAPP";
uint256 public totalSupply = 1000000000000000000000000; // 1 million tokens
uint8 public decimals = 18;
event Transfer(
address indexed _from,
@speaktoalvin
speaktoalvin / pofile with sub specs
Last active February 19, 2017 03:03
Creating a framework with Realm as a dependency
Pod::Spec.new do |s|
s.name = 'MyFramework'
s.version = '0.1.0'
s.summary = 'An iOS, watchOS and tvOS framework'
s.description = <<-DESC
An iOS, watchOS and tvOS framework
DESC
s.homepage = 'https://github.com/aaalveee/MyFramework'
s.license = { :type => 'MIT', :file => 'LICENSE' }
@speaktoalvin
speaktoalvin / DummyProject Podfile
Last active February 18, 2017 15:40
Creating a framework with Realm as a dependency
use_frameworks!
def shared_pods
pod 'MyFramework', :git => 'https://github.com/aaalveee/MyFramework.git'
end
target 'DummyProject' do
platform :ios, '10.2'
shared_pods
end
@speaktoalvin
speaktoalvin / Podspec
Last active February 18, 2017 16:07
Creating a framework with Realm as a dependency
Pod::Spec.new do |s|
s.name = 'MyFramework'
s.version = '0.1.0'
s.summary = 'An iOS, watchOS and tvOS framework'
s.description = <<-DESC
An iOS, watchOS and tvOS framework
DESC
s.homepage = 'https://github.com/aaalveee/MyFramework'
@speaktoalvin
speaktoalvin / Podile
Last active February 18, 2017 16:06
Creating a framework with Realm as dependency
use_frameworks!
target 'MyFramework_Tests' do
pod 'MyFramework', :path => '../'
pod 'RealmSwift'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
@speaktoalvin
speaktoalvin / WithInlineFunctions
Created November 28, 2016 21:50
ConvertingAFunction
FROM ------>>>
func createTodayContacts() -> [Contact] {
var allContacts = contactsManager.contacts
allContacts = contactsManager.sortContactsByOlderDateFirst(contacts: allContacts)
var dayContacts = [Contact]()
@speaktoalvin
speaktoalvin / StructToEnum
Created November 28, 2016 20:49
Converting From Struct to Enum
struct K {
struct StoryBoards {
struct Home {
static let Name = "Home"
static let IdNavigationViewController = "NavigationViewController"
static let IdTabsViewController = "HomeTabBarController"
}
import Foundation
import CoreData
@objc(Todos)
public class Todos: NSManagedObject {
}
@speaktoalvin
speaktoalvin / Sublime Text 3 Build 3103 License Key - CRACK
Created August 10, 2016 21:36
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@speaktoalvin
speaktoalvin / mac-apps.md
Created July 12, 2016 10:26 — forked from erikreagan/mac-apps.md
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik