Skip to content

Instantly share code, notes, and snippets.

View am11's full-sized avatar
🎉
if you are reading this, have a great day!

Adeel Mujahid am11

🎉
if you are reading this, have a great day!
View GitHub Profile
@am11
am11 / SassMeister-input.scss
Created March 9, 2015 01:11
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@keyframes {
from {
foo: bar; } }
@am11
am11 / SassMeister-input.scss
Created January 7, 2015 18:27
Generated by SassMeister.com.
// ----
// libsass (v3.1.0-beta)
// ----
$range: 1px, 2px, 3px, 4px;
@debug $range;//1px, 2px, 3px, 4px
$test: min($range...);
@debug $test;//1px
.a{
prop1: $test;
@am11
am11 / srv-cson.js
Created July 20, 2014 07:09
JSON to CSON conversion
fs.readFile(params.sourceFileName, 'utf8', function (err, data) {
if(data)
data = JSON.parse(data);
if (err || !data) {
err = err || "Invalid JSON content found";
writer.write(JSON.stringify({
Success: false,
SourceFileName: params.sourceFileName,
@am11
am11 / .csssortrc
Created June 4, 2014 15:37
Default configuration file for CssSorter
// Web Essentials default .csssortrc file for CssSorter configuraiton.
// Why .*rc in the name? To keep it align with .jshintrc, .jscsrc and
// apparently this goes back to 1965: http://www.linuxquestions.org/questions/linux-newbie-8/what-does-rc-stand-for-31758/
{
"ruleOrder" : ["declaration", "tag", "id", "class"],
"sortTag" : "desc", // desc or asc alphabetic order. To skip tag-name sorting, remove this line or set the value to null.
"sortIDs" : null, // desc or asc alphabetic order. To skip id sorting, remove this line or set the value to null.
"sortClasses" : "asc", // desc or asc alphabetic order. To skip class sorting, remove this line or set the value to null.
"SortDeclarations" : "custom", // desc or asc alphabetic order or custom order according to the following the lists
@am11
am11 / FileSystemObserver.cs
Created April 3, 2014 19:30
File System Observer
using System;
using System.IO;
namespace MadsKristensen.EditorExtensions
{
public class FileSystemObserver
{
public static void CreateFileWatcher(string fileName,
Action<object, FileSystemEventArgs> changed,
Action<object, FileSystemEventArgs> created,
@am11
am11 / AccountModels.cs
Created February 22, 2014 18:49
MVC3 AccountModels.cs
using System.ComponentModel.DataAnnotations;
namespace WebApplication6.Models
{
public class ChangePasswordModel
{
[Required]
[DataType(DataType.Password)]
[Display(Name = "Current password")]
public string OldPassword { get; set; }
@am11
am11 / AncestryManager.cs
Last active January 3, 2016 10:59
Ancestry Manager for WE
// Note: We must have an option set to false for this kind of feature,
// unless there is better -- less expensive -- way to do detect cycles while walking.
using System.Collections.Generic;
using System.Linq;
using Microsoft.CSS.Editor;
using Microsoft.Web.Editor;
//public class Importer//: HypotheticalVsShellClass
//{
align-content,
align-items,
align-self,
alignment-adjust,
alignment-baseline,
all,
anchor-point,
animation,
animation-delay,
animation-direction,
@am11
am11 / Convert video files for HTML5 with FFMPEG :: Windows and Linux
Last active December 26, 2015 05:49
Convert video files for HTML5 with FFMPEG :: Windows and Linux
/* Starting with avi file "moh.avi" .. could be any video format */
ffmpeg -i moh.avi -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 moh.mp4 // IE, Opera, Chrome, Safari
(OR)
ffmpeg -i moh.avi -b 1500k -ab 128k -ac 2 -vcodec libx264 -preset slow -crf 22 -threads 0 -profile:v main moh.avi
ffmpeg -i moh.avi -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 moh.ogv // Firefox
ffmpeg -i moh.avi -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 moh.webm // Chrome
@am11
am11 / MVC 4 Code First
Last active December 16, 2015 11:38
MVC 4 Kick Start.. Code first
Create a new MVC 4 project and add four classes under Models: Round.cs, Tournament.cs, Team.cs and RoundTeam.cs.
Add this in Round.cs file:
public class Round
{
public int Id { get; set; }
public int TournamentId { get; set; }