This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Combine | |
enum APIError: Error, LocalizedError { | |
case unknown, apiError(reason: String) | |
var errorDescription: String? { | |
switch self { | |
case .unknown: | |
return "Unknown error" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder> { | |
private List<CustomObject> objects; | |
private OnItemSelectedListener listener; | |
private final boolean withContextMenu; | |
class ViewHolder extends RecyclerView.ViewHolder | |
implements View.OnClickListener, View.OnCreateContextMenuListener, PopupMenu.OnMenuItemClickListener { | |
@BindView(R.id.custom_name) |
(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn
As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.
Note: Defined models and collections will be used in entire cheatsheet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable */ | |
/* Depricated EvenetEmitter Auth0 setup */ | |
import { EventEmitter } from 'events' | |
import { getItem } from '../storage' | |
import { isTokenExpired } from './authToken' | |
import lockInstance from './lockInstance' | |
const isClient = typeof window !== 'undefined' | |
// temp hack until redux implmented | |
function triggerLoginEvent(authResult, profile) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Think of this "main.js" file as your application bootstrap. | |
*/ | |
import Vue from 'vue' | |
import Resource from 'vue-resource' | |
import VueRouter from 'vue-router' | |
import routes from './routes' | |
import middleware from './middleware' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
using Android.Runtime; | |
using Android.Views; | |
using Android.Widget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | |
{ | |
var view = base.OnCreateView(inflater, container, savedInstanceState); | |
var recyclerView = view.FindViewById<RecyclerView>(Resource.Id.my_recycler_view); | |
if (recyclerView != null) | |
{ | |
recyclerView.HasFixedSize = true; | |
var layoutManager = new LinearLayoutManager(Activity); |
Instructions on how to setup a secured Jenkins CI.
$ wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
$ sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list$ .d/jenkins.list'
$ sudo apt-get update
$ sudo apt-get install jenkins
NewerOlder