Skip to content

Instantly share code, notes, and snippets.

View vesrah's full-sized avatar
🍠

Joseph Brasch vesrah

🍠
  • Phoenix, Az, USA
  • 16:37 (UTC -07:00)
View GitHub Profile
@BorisWechselberger
BorisWechselberger / MultiTranslateHttpLoader.ts
Last active July 6, 2022 15:59
TranslateLoader for multiple JSON files
import {HttpClient} from '@angular/common/http';
import {TranslateLoader} from '@ngx-translate/core';
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/observable/forkJoin';
export function translateLoader(http: HttpClient) {
return new MultiTranslateHttpLoader(http, [
{prefix: './assets/i18n/', suffix: '.json'},
{prefix: './assets/i18n/countries-', suffix: '.json'}
@rhullah
rhullah / Mvc\Scripts\ImagePicker\designerview-simple.js
Last active September 6, 2017 14:49
Multiple Image picker with Sorting
angular.module('designer').requires.push('sfImageSelector', 'sfSelectors', 'ngSanitize');
angular.module('designer').controller('SimpleCtrl', [
'$scope',
function ($scope) {
// This (or some representation of it) is what you'd save back to the Properties (Controller)
$scope.selectedImages = [];
$scope.picker = {
@a3dho3yn
a3dho3yn / mongodb_c#_cheatsheet.md
Last active March 10, 2025 21:41
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(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.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

@timw255
timw255 / SearchResultHelper.cs
Created October 31, 2016 14:40
Helper methods to get additional information about items returned in Sitefinity search results.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.OpenAccess;
using Telerik.Sitefinity.Services.Search.Data;
using Telerik.Sitefinity.Taxonomies;
using Telerik.Sitefinity.Taxonomies.Model;
using Telerik.Sitefinity.Utilities.TypeConverters;
using Telerik.Sitefinity.Data;
@danrcoull
danrcoull / Foundation6-TabToAccordion.js
Last active November 18, 2016 16:09
Foundation 6 - Convert Tabs to Accordion on small Screens.
## Description Add the below To any Foundation 6 theme and change the iniialUlClass to whatever your tab ul class is.
## Author : Daniel Coull <ttechitsolutions@gmail.com>
var tabsToAccordian = {
initialUlClass: '.easytabs',
accordian: null,
tabs:null,
@leonardofed
leonardofed / README.md
Last active October 23, 2025 11:18
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@timw255
timw255 / BlogPostDetailViewModel.cs
Last active June 28, 2020 18:14
Model, Views, and Controller to return a Sitefinity Blog Post as valid AMP content. (Uses timw255.AMP)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Sitefinity.News.Model;
using timw255.AMP;
namespace SitefinityWebApp.Mvc.Models
{
public class BlogPostDetailViewModel
@chrisbuttery
chrisbuttery / 1.js
Last active April 6, 2024 16:10
Fade in / Fade out
// fade out
function fade(el) {
var op = 1;
var timer = setInterval(function () {
if (op <= 0.1){
clearInterval(timer);
el.style.display = 'none';
}
el.style.opacity = op;
@aras-p
aras-p / preprocessor_fun.h
Last active October 9, 2025 17:55
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@terlar
terlar / README.markdown
Last active October 11, 2019 16:07
ArchLinux on Mac Book Retina 13"