Skip to content

Instantly share code, notes, and snippets.

@vsaurabh04
vsaurabh04 / configuration
Last active January 25, 2021 22:08
CKEditor 5 Configuration
editorConfig = {
toolbar: {
items: [
'bold',
'italic',
'underline',
'link',
'bulletedList',
'numberedList',
'|',
@mstrYoda
mstrYoda / SelectLambdaBuilder.cs
Last active September 29, 2021 10:21
Creating dynamically select lambda methods using expressions with c#
public class SelectLambdaBuilder<T>
{
private static Dictionary<Type, PropertyInfo[]> _typePropertyInfoMappings = new Dictionary<Type, PropertyInfo[]>();
private readonly Type _typeOfBaseClass = typeof(T);
private Dictionary<string, List<string>> GetFieldMapping(string fields)
{
if (string.IsNullOrEmpty(fields))
{
return null;
anonymous
anonymous / index.html
Created March 7, 2018 05:26
Weather Dashboard by STUDIOJQ
<header>
<ul class="breadcrumbs">
<li><a href="#">Weather App</a></li>
<li><a href="#">Global Outlook</a></li>
<li><a href="#">Europe</a></li>
</ul>
<div class="credits">Project/Design by <a href="https://twitter.com/STUDIOJQ">Jonathan Quintin</a> -> <a href="https://dribbble.com/shots/1346874-Weather-Dashboard-Global-Outlook-5?list=users&offset=71">Dribbble</a></div>
</header>
@landsman
landsman / draft.js
Last active December 6, 2022 18:06
automatic convert bootstrap v. 3 to bootstrap v. 4 idea ... more on https://github.com/twbs/bootstrap/blob/v4-dev/docs/4.0/migration.md, http://upgrade-bootstrap.bootply.com/
let gulp = require('gulp'),
replace = require('gulp-batch-replace'),
filesExist = require('files-exist');
gulp.task('bt4', () =>
{
let diff = {
'@media (min-width: $screen-xs-min) and (max-width: $screen-sm-max)': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, xs))',
'@media (min-width: $screen-xs) and (max-width: ($screen-md-min - 1))': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, md)-1)',
@weedkiller
weedkiller / SortSearchExtensions.cs
Created January 21, 2018 21:43 — forked from mombrea/SortSearchExtensions.cs
Extension Methods for table sorting and search query
using System.Collections.Specialized;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace My.App
{
public static class Extensions
{
/// <summary>
@sygn
sygn / AccountController.FacebookCallback1.cs
Created November 17, 2017 20:30 — forked from ntotten/AccountController.FacebookCallback1.cs
Facebook Authentication with the Facebook C# SDK and ASP.NET MVC 4
public ActionResult FacebookCallback(string code)
{
var fb = new FacebookClient();
dynamic result = fb.Post("oauth/access_token", new
{
client_id = "your_app_id_here",
client_secret = "your_app_secret_here",
redirect_uri = RedirectUri.AbsoluteUri,
code = code
});
@derick-montague
derick-montague / sync-github-to-bitbucket.md
Last active March 11, 2024 09:36
Sync github repo to bitbucket repo

Set up remotes

setup local repo

mkdir myrepository
cd myrepository
git init

add bitbucket remote as "origin"

@mombrea
mombrea / SelectListExtensionMethods.cs
Last active January 21, 2018 21:44 — forked from nickalbrecht/SelectListExtensionMethods.cs
SelectListItem Extension Methods for DropDowns in MVC, Updated comments for better intellisense
public static class SelectListExtensionMethods
{
//// simple Enum for demonstration in the examples
//enum Colors {
// Red = 1,
// Green = 2,
// Blue = 3
//}
//// Simple Class for demonstration in the examples
@weedkiller
weedkiller / limitEval.js
Created January 21, 2017 19:44 — forked from westc/limitEval.js
Use web workers to limit the amount of time that an eval can run.
function limitEval(code, fnOnStop, opt_timeoutInMS) {
var id = Math.random() + 1,
blob = new Blob(
['onmessage=function(a){a=a.data;postMessage({i:a.i+1});postMessage({r:eval.call(this,a.c),i:a.i})};'],
{ type:'text/javascript' }
),
myWorker = new Worker(URL.createObjectURL(blob));
function onDone() {
URL.revokeObjectURL(blob);
@Rooster212
Rooster212 / GridLibraries.md
Last active November 23, 2020 17:05
List of dashboard drag-drop style widgets