Skip to content

Instantly share code, notes, and snippets.

Avatar

Biranchi biranchi2018

  • Bangalore, India
View GitHub Profile
@upkarlidder
upkarlidder / dl-resources.md
Last active Jul 7, 2020
Deep Learning Hands-On Series with Eric Schles
View dl-resources.md
View Word_Vector_Similarity.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@biranchi2018
biranchi2018 / luhn.js
Created Sep 21, 2016 — forked from ShirtlessKirk/luhn.js
Luhn validation algorithm
View luhn.js
/**
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers
* @author ShirtlessKirk. Copyright (c) 2012.
* @license WTFPL (http://www.wtfpl.net/txt/copying)
*/
var luhnChk = (function (arr) {
return function (ccNum) {
var
len = ccNum.length,
bit = 1,
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active May 9, 2022
Add Git Branch Name to Terminal Prompt (Linux/Mac)
View terminal-git-branch-name.md

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@prime31
prime31 / gist:5675017
Last active Apr 7, 2022
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
View gist:5675017
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@ShirtlessKirk
ShirtlessKirk / luhn.js
Last active May 10, 2022
Luhn validation algorithm
View luhn.js
/**
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers
* @author ShirtlessKirk. Copyright (c) 2012.
* @license WTFPL (http://www.wtfpl.net/txt/copying)
*/
var luhnChk = (function (arr) {
return function (ccNum) {
var
len = ccNum.length,
bit = 1,
@rjungemann
rjungemann / Communicator.h
Created Jun 21, 2010
How to open a TCP socket in Objective-C
View Communicator.h
#import <Foundation/Foundation.h>
@interface Communicator : NSObject <NSStreamDelegate> {
@public
NSString *host;
int port;
}
- (void)setup;