Skip to content

Instantly share code, notes, and snippets.

View nagappankv's full-sized avatar
🎯
Focusing

nagappankv nagappankv

🎯
Focusing
View GitHub Profile
@nagappankv
nagappankv / gist:95ffa21d3768d5f0489e
Created November 10, 2015 17:54 — forked from Mithrandir0x/gist:3639232
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@nagappankv
nagappankv / get-watchers.js
Created November 11, 2015 15:45 — forked from kentcdodds/get-watchers.js
Get Watchers of element and its children
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));

#AngularJS Application List Here is a list of some Angular Free Application / snippets to help you out with your projects

angular git://github.com/angular/bower-angular.git
angular-mocks git://github.com/angular/bower-angular-mocks.git
angular-resource git://github.com/angular/bower-angular-resource.git
angular-scenario git://github.com/angular/bower-angular-scenario.git
angular-cookies git://github.com/angular/bower-angular-cookies.git
angular-sanitize git://github.com/angular/bower-angular-sanitize.git

angular-bootstrap git://github.com/angular-ui/bootstrap-bower.git

@nagappankv
nagappankv / iterm2-solarized.md
Created May 30, 2018 22:48 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@nagappankv
nagappankv / gist:e0c114c641514700bb460ef9896bdda8
Created January 2, 2020 02:40 — forked from marcanuy/gist:06cb00bc36033cd12875
The 5,000 Most Frequently Used Domain Name Prefixes and Suffixes
1. my+ 1001. se+ 2001. thedaily+ 3001. empire+ 4001. herb+
2. +online 1002. test+ 2002. giant+ 3002. +cook 4002. +teen
3. the+ 1003. fish+ 2003. survey+ 3003. +deluxe 4003. affordable+
4. +web 1004. hk+ 2004. +conference 3004. +crunch 4004. proto+
5. +media 1005. florida+ 2005. twit+ 3005. michigan+ 4005. +ity
6. web+ 1006. fine+ 2006. pick+ 3006. cars+ 4006. myhome+
7. +world 1007. loan+ 2007. +dvd 3007. +forest 4007. plastic+
8. +net 1008. page+ 2008. cinema+ 3008. yacht+ 4008. +kc
9. go+ 1009. fox+ 2009. desi+ 3009. +wallet 4009. +foot
10. +group 1010. +gift 2010. act+ 3010. +contest 4010. +sup
@nagappankv
nagappankv / AdbCommands
Created January 16, 2020 21:28 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@nagappankv
nagappankv / app.js
Created January 27, 2023 15:15
Global State Management - Pari
/**
* you can use the GlobalStateContext in any component to access the state and setter functions, and wrap your entire app with the GlobalStateProvider to make the context available throughout your app.
*/
import { GlobalStateProvider } from './globalState';
function App() {
return (
<GlobalStateProvider>
<SearchField />
-- Which are the top 5 products by sales?
SELECT
`Product Name`,
SUM(`Sales`) AS `Total Sales`
FROM
Superstore
GROUP BY
`Product Name`
ORDER BY
`Total Sales` DESC
var standardEmail = /^(?!.+@(gmail|google|yahoo|outlook|hotmail|msn| 123.com|123box.net|123india.com|123mail.cl|123qwe.co.uk|150ml.com|15meg4free.com|163.com|1coolplace.com|1freeemail.com|1funplace.com|1internetdrive.com|1mail.net|1me.net|1mum.com|1musicrow.com|1netdrive.com|1nsyncfan.com|1under.com|1webave.com|1webhighway.com|212.com|24horas.com|2911.net|2d2i.com|2die4.com|3000.it|37.com|3ammagazine.com|3email.com|3xl.net|444.net|4email.com|4email.net|4mg.com|4newyork.com|4x4man.com|5iron.com|88.am|8848.net|aaronkwok.net|abbeyroadlondon.co.uk|abdulnour.com|aberystwyth.com|about.com|academycougars.com|acceso.or.cr|access4less.net|accessgcc.com|ace-of-base.com|acmemail.net|acninc.net|adres.pl|adios.net|ados.fr|advalvas.be|aeiou.pt|aemail4u.com|aeneasmail.com|afreeinternet.com|agoodmail.com|ahaa.dk|aichi.com|airpost.net|ajacied.com|aim.com|ak47.hu|aknet.kg|albawaba.com|alex4all.com|alexandria.cc|algeria.com|alhilal.net|alibaba.com|alive.cz|allmail.net|alloymail.com|allsaintsfan.com|alskens.dk|altavista.com|alta