Skip to content

Instantly share code, notes, and snippets.

View vidakovic's full-sized avatar
🎯
Focusing

Aleksandar Vidakovic vidakovic

🎯
Focusing
View GitHub Profile
@cdevans
cdevans / mvc5-upgrade.md
Last active September 9, 2016 21:04
Upgrade an ASP.NET MVC Project to MVC5
  1. Use NuGet Package Manager (or Package Manager Console) to upgrade JavaScript packages, and update all script references appropriately (particularly Views/Shared/Layout.cshtml):
  • jQuery (Update-Package -Id jQuery)
  • jQuery UI (Update-Package -Id jQuery.UI.Combined)
  • jQuery Validation (Update-Package -Id jQuery.Validation)
  • Modernizr (Update-Package -Id Modernizr)
  1. Use NuGet Package Manager (or Package Manager Console) to upgrade the EntityFramework packages:
  • EntityFramework (Update-Package -Id EntityFramework)
  • Ensure that all projects no longer reference System.Data.Entity.dll (references should be removed by the package upgrade).
  • Swap any EF Designer (EDMX) models to use EF 6.x code generation.
@jawadatgithub
jawadatgithub / OIDC and OAuth2 Flows.md
Last active February 11, 2024 23:15
Enrich IdentityServer3 Documentation with OIDC (OpenID Connect) and OAuth2 Flows section
Note for community:

A. IdentityServer3 docs, samples and source code use OIDC & OAuth2 terms interchangeably to refer to same thing in many areas. I think that's make sense because OIDC introduced as complement & extension for OAuth2.

B. IdentityServer3, STS, OP, OIDC server, OAuth2 server, CSP, IDP and others: means same thing (software that provide/issue tokens to clients) as explained in [Terminology] (http://identityserver.github.io/Documentation/docs/overview/terminology.html).

C. Grants and flows mean same thing, grant was the common term in OAuth2 specs and flow is the common term in OIDC specs.

D. This document will not focus on custom flow/grant.

E. [Important] Choosing wrong flow leads to security threat.

@lewisd32
lewisd32 / iptableflip.sh
Created April 15, 2015 18:20
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
@sleepiecappy
sleepiecappy / RibbonRestBalanced.java
Created April 5, 2015 21:03
Resquest Interceptor Bean Impl
@Bean
@ConditionalOnMissingBean(RequestInterceptor.class)
@ConditionalOnBean(OAuth2ClientContext.class)
@ConditionalOnClass({RequestInterceptor.class, Feign.class})
feign.RequestInterceptor requestInterceptor(OAuth2ClientContext context) {
if (context == null) return null;
return new OAuth2FeignRequestInterceptor(context);
}
public class OAuth2FeignRequestInterceptor implements RequestInterceptor {
@bleathem
bleathem / gist:50b4dd2fd4377503eaad
Last active August 22, 2018 20:54
Creating an Rx.js Observable from a STOMP over Websocket source (with error handling)
// see: https://github.com/jmesnil/stomp-websocket
var client = Stomp.client('ws://...');
client.debug = undefined;
var live = Rx.Observable.create(function (observer) {
console.log('Connecting...')
client.connect(username, password, function(frame) {
console.log(frame.toString());
observer.onNext(frame);
@magnetikonline
magnetikonline / README.md
Last active January 29, 2025 06:06
NSSM - the Non-Sucking Service Manager cheatsheet.
@pintowar
pintowar / RXGlue.groovy
Created January 14, 2015 00:56
Creating a SSE streaming with Apache Camel and Ratpack, using Rx Groovy as a glue
@Grab('com.netflix.rxjava:rxjava-groovy:0.20.7')
@Grab('io.reactivex:rxjava-reactive-streams:0.3.0')
@Grab('org.apache.camel:camel-rx:2.14.1')
@Grab('io.ratpack:ratpack-groovy:0.9.11')
@Grab('org.slf4j:slf4j-simple:1.6.6')
import org.apache.camel.impl.*
import org.apache.camel.rx.*
import static rx.RxReactiveStreams.toPublisher
import static ratpack.groovy.Groovy.ratpack
import static ratpack.sse.ServerSentEvents.serverSentEvents;
@demisx
demisx / gulpfile.js
Last active July 14, 2022 16:06
Gulp 4 gulpfile.js
// Gulp 4
var gulp = require('gulp');
var using = require('gulp-using');
var grep = require('gulp-grep');
var changed = require('gulp-changed');
var del = require('del');
var coffee = require('gulp-coffee');
var less = require('gulp-less');
var coffeelint = require('gulp-coffeelint');
var sourcemaps = require('gulp-sourcemaps');
@fabb
fabb / archive_ipa.sh
Created November 1, 2014 12:39
Script to archive an ipa from commandline - depends on xctool
#!/bin/bash
set -x
cd ${0%/*}/..
# codesigning and choosing of provisioning profile is configured via project settings and is dependent of build config
: ${BUILD_NUMBER:?"Need to set BUILD_NUMBER"}
WORKSPACE=<yourworkspace>.xcworkspace
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox