Skip to content

Instantly share code, notes, and snippets.

View chellem's full-sized avatar
🎯
Focusing

Dickriven Chellemboyee chellem

🎯
Focusing
View GitHub Profile
@matux
matux / scntool.md
Last active April 11, 2023 13:49
SceneKit scntool command line options
$ xcrun scntool --verbose
| Current SceneKit version is 4.560000
| Running scntool (compiled on Jul  1 2018 01:01:55)

usage: scntool --convert file --format format [--output file]
000084a8:  7363 7269 7074 696f 6e00 2d2d 7461 7267 6574 2d70 6c61 7466  :scription.--target-platf
@trilliwon
trilliwon / uiimage-data.swift
Last active January 12, 2024 14:45
Swift UIImage to Data, Data to UIImage
// Swift4
let image = UIImage(named: "sample")
let data = image?.pngData()
let data = image?.jpegData(compressionQuality: 0.9)
let uiImage: UIImage = UIImage(data: imageData)
// deprecated
// var imageData: Data = UIImagePNGRepresentation(image)
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
@teriiehina
teriiehina / super_xcov.rb
Created June 7, 2016 10:28
Hacky way to get code coverage from xcov in a Fastlane lane
module Fastlane
module Actions
module SharedValues
SUPER_XCOV_CODE_COVERAGE = :SUPER_XCOV_CODE_COVERAGE
end
class SuperXcovAction < Action
def self.run(options)
Actions.verify_gem!('xcov')
require 'xcov'
@vinnybad
vinnybad / Fastfile
Created June 3, 2016 19:16
Shows one way to fail a build in fastlane when code coverage does not meet a minimum threshold.
#
# Shows one way to fail a build in fastlane when code
# coverage does not meet a minimum threshold.
#
# there are other ways to check the coverage of the commit,
# but I couldn't find an existing tool that makes this easier
# that will run on bitrise. I would have normally used diff-cover
# to do this because you can compare branches and only check the diffs.
# Unfortunately that means you have to find a way to install it on bitrise
# at the time of writing and that can be tricky.
@jonatanrdsantos
jonatanrdsantos / curl-problem.md
Last active August 21, 2020 05:23
curl port 443: Network is unreachable problem

How to solve the curl port 443: Network is unreachable problem:

joridos@localhost:~/Documents/github$ opam init
default    Downloading https://opam.ocaml.org/urls.txt
'opam init' failed.
# opam-version    1.1.1
# os              linux
Cannot download https://opam.ocaml.org/urls.txt, please check your connection settings.
joridos@localhost:~/Documents/github$ curl https://opam.ocaml.org/urls.txt
@tjamps
tjamps / README.md
Last active February 29, 2024 14:57
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authentication
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :

@mark47
mark47 / datatables.datetime-flex.js
Last active March 18, 2019 06:18
Plugin for jQuery Datatables sorting of US-style date and time. Requires month, day and year. Time is optional and can be in 12 or 24 hour formats. Properly parses mm/m, dd/d and yyyy/yy.
/**
* DataTables plug-in to handle U.S.-style dates. Requires month day year.
* Time is optional and can be in 12 or 24 hour formats.
* Properly parses mm/m, dd/d and yyyy/yy.
*
* Based on original datetime-us plugin by Kevin Gravier.
*
* @name Flexible US Datetime
* @summary Sort dates and times in US mm/dd/yyyy with optional time.
* @author Mark Stewart
@Stanback
Stanback / nginx.conf
Last active June 14, 2024 10:21 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.