Skip to content

Instantly share code, notes, and snippets.

View raulsilvamx's full-sized avatar

Raul Silva raulsilvamx

  • Korero
  • Monterrey, Nuevo León, Mexico
  • 20:02 (UTC -06:00)
  • X @raulsilvamx
View GitHub Profile
@a7ul
a7ul / jamf.md
Last active March 29, 2024 09:47
removing all restrictions on jamf managed macos device - Provided you have root access.

REMOVE JAMF RESTRICTIONS ON MAC

REMOVE ONLY RESTRICTIONS

sudo jamf removeMDMProfile removes all restrictions

sudo jamf manage brings back all restrictions and profiles

REMOVE ALL RESTRICTIONS AND DISABLE JAMF BINARIES WHILE KEEPING YOUR ACCESS TO VPN AND OTHER SERVICES

sudo jamf removeMDMProfile removes all restrictions

@jdmcd
jdmcd / API.swift
Last active June 19, 2020 07:37
Alamofire + Codable
class API {
static let apiKey = "test"
static let baseUrl = ""
enum Endpoint {
case login
case register
var endpoint: String {
switch self {
@gotelgest
gotelgest / SearchPushRow.swift
Last active February 24, 2024 14:35
SearchPushRow for Eureka 4.0.1 (Swift 4)
import Eureka
open class _SearchSelectorViewController<Row: SelectableRowType, OptionsRow: OptionsProviderRow>: SelectorViewController<OptionsRow>, UISearchResultsUpdating where Row.Cell.Value: SearchItem {
let searchController = UISearchController(searchResultsController: nil)
var originalOptions = [ListCheckRow<Row.Cell.Value>]()
var currentOptions = [ListCheckRow<Row.Cell.Value>]()
open override func viewDidLoad() {
@noefroidevaux
noefroidevaux / Project.swift
Created September 7, 2017 13:27
SearchPushRow for Eureka 3.0 (Swift 3.1)
// Add SearchItem protocol to the model (here Project)
extension Project: SearchItem {
func matchesSearchQuery(_ query: String) -> Bool {
return name.lowercased().contains(query.lowercased())
}
}
@norsez
norsez / MovieWriter.swift
Created May 11, 2017 04:13 — forked from isthisjoe/MovieWriter.swift
Swift 3 | macOs | Write NSImage(s) to a movie file. Modified from http://stackoverflow.com/a/36297656/1275125
import AppKit
import AVFoundation
class MovieWriter: NSObject {
func writeImagesAsMovie(_ allImages: [NSImage], videoPath: String, videoSize: CGSize, videoFPS: Int32) {
// Create AVAssetWriter to write video
guard let assetWriter = createAssetWriter(videoPath, size: videoSize) else {
print("Error converting images to video: AVAssetWriter not created")
return
}
@maxhanglin
maxhanglin / eureka_swift_3:searchable_push_row.swift
Created April 13, 2017 16:20
Searchable Push Row for Eureka
import Eureka
open class _SearchablePushRow<T: Equatable, Cell: CellType> : TableSelectorRow<Cell, SearchableViewController<T>> where Cell: BaseCell, Cell: TypedCellType, Cell.Value == T, T: SearchableItem, T: CustomStringConvertible {
public required init(tag: String?) {
super.init(tag: tag)
onCreateControllerCallback = { [weak self] _ in
let controller = SearchableViewController<T>()
controller.searchPlaceholder = self?.searchPlaceholder
return controller
@isthisjoe
isthisjoe / MovieWriter.swift
Last active July 8, 2020 07:28
Swift 3 | macOs | Write NSImage(s) to a movie file. Modified from http://stackoverflow.com/a/36297656/1275125
import AppKit
import AVFoundation
class MovieWriter: NSObject {
func writeImagesAsMovie(_ allImages: [NSImage], videoPath: String, videoSize: CGSize, videoFPS: Int32) {
// Create AVAssetWriter to write video
guard let assetWriter = createAssetWriter(videoPath, size: videoSize) else {
print("Error converting images to video: AVAssetWriter not created")
return
}
@letanure
letanure / bootstrap-all-elements.html
Created June 14, 2016 10:07
List of all bootstrap components
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap all elements</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
@yoichitgy
yoichitgy / mergegenstrings.py
Last active July 9, 2022 23:59
A script to generate .strings file for .swift, .m, .storyboard and .xib files by genstrings and ibtool commands, and merge them with existing translations.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Localize.py - Incremental localization on XCode projects
# João Moreno 2009
# http://joaomoreno.com/
# Modified by Steve Streeting 2010 http://www.stevestreeting.com
# Changes
# - Use .strings files encoded as UTF-8
@idleberg
idleberg / fish_shell.md
Last active March 27, 2024 22:37
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. Also includes several useful functions.

Installation

  1. Install fish via Brew
  2. Optionally install Oh My Fish!
  3. Add fish to known shells
  4. Set default shell to fish
brew install fish  
curl -L https://get.oh-my.fish | fish