Skip to content

Instantly share code, notes, and snippets.

View divyang4481's full-sized avatar

Divyang Panchasara divyang4481

View GitHub Profile
/* https://github.com/nikos/cmskern/blob/master/playapp/public/javascripts/widgets.js*/
/**
* Widget for displaying a complete form as specified by the given schema.
*/
angular.widget('my:form', function(element) {
this.descend(true); // compiler will process children elements
this.directives(true); // compiler will process directives

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@divyang4481
divyang4481 / start.sh
Created August 16, 2017 07:44 — forked from mach6/start.sh
docker (v1.11.1) quickstart terminal start.sh for hyper-v host
#!/bin/bash
# ---------------------------------------------------------------------------------------------------------------------\
# Copyright (C) 2016 Doug Simmons |
# |
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance |
# with the License. |
# |
# You may obtain a copy of the License at |
# |
# http://www.apache.org/licenses/LICE
@divyang4481
divyang4481 / tssp crack.txt
Created November 17, 2017 08:49
Tangible Software Solutions Crack - Hex Patch
[Filename] [Offset]
C# to C++ Converter 44C5E
C# to Java Converter 3F63A
C++ to C# Converter 4AE22
C++ to VB Converter 45FA2
Instant CSharp 1F4E2
Instant VB 29D22
Java to C++ Converter 24E9E
Java to C# Converter 19BCA
Java to VB Converter 17B7E
@divyang4481
divyang4481 / getMousePosition.js
Created February 19, 2018 07:25 — forked from branneman/getMousePosition.js
getMousePosition(event) - cross browser normalizing of: clientX, clientY, screenX, screenY, offsetX, offsetY, pageX, pageY
/**
* @param {Event} evt
* @return {Object}
*/
function getMousePosition(evt) {
var pageX = evt.pageX;
var pageY = evt.pageY;
if (pageX === undefined) {
pageX = evt.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
@divyang4481
divyang4481 / dabblet.css
Created February 21, 2018 19:10 — forked from Chrisedmo/dabblet.css
Overflow scroll horizontal - No FlexBox

Resume clustering

Description

I have a resume, but does it say what I want it to say? Specifically, do machine learning algorithms cluster my resume with the job title I would like them to?

Data source

  • Linkedin data/resumes for various job titles: developer, devops, data scientist, full stack, etc.

Method

  1. Create a database of resumes: developer, devops, data scientist, full stack, etc.
  2. Train a K-means model
@divyang4481
divyang4481 / ConsoleApplication2.cs
Created May 28, 2018 06:14 — forked from ekepes/ConsoleApplication2.cs
C# implementation of a Linear Congruential Generator (LCG) for psuedorandom number generation
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
var freq = new int[20];
var rng = new RandomNumberGenerator();
@divyang4481
divyang4481 / gist:38c88e0a2cf434ea0322a928cc419ad9
Created September 7, 2018 06:23 — forked from jdewind/gist:2467675
iOS mirroring selection
// Make sure MediaPlayer.framework has been added and the MPAudioVideoRoutingPopoverController interface has been declared.
@interface MyViewController ()
@property (strong, nonatomic) MPAudioVideoRoutingPopoverController *airplayPopoverController;
@end
- (void)someButtonTapped:(id)sender {
self.airplayPopoverController = [[MPAudioVideoRoutingPopoverController alloc] initWithType:0 includeMirroring:YES];
self.airplayPopoverController.delegate = self;
[self.airplayPopoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
// Stuff needed to make C# a kind of cluttered subtyping Haskell:
// - Higher kinded polymorphism (being able to pass Generic Type Definitions as type parameters)
// - Static interfaces & static abstract types (this gets quite perverse at the CLR level)
// - GADTS (easily implemented as syntactic sugar)
namespace HKP {
public static A<B> Create<A, B>() where A : <>, new() {
return new A<B>(); // Can't do a whole lot of useful things here, since we know little about TFn
}