Skip to content

Instantly share code, notes, and snippets.

View vinothvino42's full-sized avatar
🎯
Focusing

Vinoth Vino vinothvino42

🎯
Focusing
View GitHub Profile
@bigmountainstudio
bigmountainstudio / GruvBox.xccolortheme
Last active March 29, 2024 18:54
Xcode Theme: GruvBox
<!-- Add this file to: ~/Library/Developer/Xcode/UserData/FontAndColorThemes -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.901961 0.831373 0.639216 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
extension Encodable {
func encode(with encoder: JSONEncoder = JSONEncoder()) throws -> Data {
return try encoder.encode(self)
}
}
extension Decodable {
static func decode(with decoder: JSONDecoder = JSONDecoder(), from data: Data) throws -> Self {
return try decoder.decode(Self.self, from: data)
}
{
"always_show_minimap_viewport": false,
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"draw_white_space": "all",
"fade_fold_buttons": false,
"folder_exclude_patterns":
@DejanEnspyra
DejanEnspyra / multipart.swift
Created July 2, 2017 07:55
Alamofire 4 — Multipart file upload with Swift 3 (http://theappspace.com/multipart-file-upload/)
func requestWith(endUrl: String, imageData: Data?, parameters: [String : Any], onCompletion: ((JSON?) -> Void)? = nil, onError: ((Error?) -> Void)? = nil){
let url = "http://google.com" /* your API url */
let headers: HTTPHeaders = [
/* "Authorization": "your_access_token", in case you need authorization header */
"Content-type": "multipart/form-data"
]
Alamofire.upload(multipartFormData: { (multipartFormData) in
@Gurdeep0602
Gurdeep0602 / AppStoryboard.swift
Last active April 2, 2024 09:54
AppStoryboard enumeration
//
// AppStoryboards.swift
// AppStoryboards
//
// Created by Gurdeep on 15/12/16.
// Copyright © 2016 Gurdeep. All rights reserved.
//
import Foundation
import UIKit
@MengTo
MengTo / gist:11280811
Created April 25, 2014 07:34
Gitignore for Xcode/Cocoapods
# Created by http://www.gitignore.io
### Xcode ###
build
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcworkspace/contents.xcworkspacedata
### Objective-C ###
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2024 16:07
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@abhinav1592
abhinav1592 / gist:4382110
Last active March 20, 2021 07:46
A simple Notepad using Java. I have used swing and awt.
package notepad;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Scanner;
import java.io.*;
public class Notepad extends JFrame implements ActionListener {
private TextArea textArea = new TextArea("", 0,0, TextArea.SCROLLBARS_VERTICAL_ONLY);