Skip to content

Instantly share code, notes, and snippets.

View npatta01's full-sized avatar
💭
Coding Some Deep Learning Projects

Nidhin Pattaniyil npatta01

💭
Coding Some Deep Learning Projects
View GitHub Profile
@leon
leon / play.conf
Created March 26, 2012 12:27
Upstart script for Play Framework 2.0
# Upstart script for a play application that binds to an unprivileged user.
# put this into a file like /etc/init/play.conf
#
# This could be the foundation for pushing play apps to the server using something like git-deploy
# By calling service play stop in the restart command and play-start in the restart command.
#
# Usage:
# start play
# stop play
# restart play
@amaxwell01
amaxwell01 / interviewitems.MD
Created September 15, 2012 14:17
My answers to over 100 Google interview questions

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@justinvw
justinvw / es_simple_autocomplete_example_config.sh
Last active January 26, 2021 17:15
Simple ElasticSearch autocomplete example configuration. The 'autocomplete' functionality is accomplished by lowercasing, character folding and n-gram tokenization of a specific indexed field (in this case "city").
# Delete the possibly existing autocomplete test index
curl -X DELETE localhost:9200/autocomplete_test
# Put the config of the autocomplete index
curl -X PUT localhost:9200/autocomplete_test -d '
{
"settings" : {
"index" : {
"analysis" : {
"analyzer" : {
@dizyart
dizyart / pageant_add_keys.bat
Last active December 15, 2015 05:59
Add Putty SSH key files (PPK) to Pageant from the command line. Type pageant_add_keys /? or /help for usage.
@echo off
goto script
REM inspired by code in http://jelledepot.blogspot.com/2009/04/putty-pageant-autoload-your-private.html
REM @author DizyArt (https://github.com/dizyart)
REM @copyright 2013 Dizyart
REM licensed under WTFPL (Do What the Fuck You Want to Public License) http://en.wikipedia.org/wiki/WTFPL
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@MattFaus
MattFaus / mixpanel_funnels.py
Created January 2, 2014 23:03
A function to programmatically build and query funnel data via the MixPanel API.
class MixPanel(object):
def get_page_view_funnel(self, content_urls):
# Build up the events array. Each "event" is a step in the funnel
events = []
for cu in content_urls:
events.append({
"event": "Page View",
"selector": 'properties["Page View Page"] == "%s"' % (cu,),
})
@chbatey
chbatey / ClassThatReturnsFuturesTest.scala
Created February 6, 2014 22:41
ScalaTest: Testing futures with future value
test("Test a asynchronous method synchronously - futureResult") {
val underTest = new ClassThatReturnsFutures()
val futureResult = underTest.goDoSomething()
futureResult.futureValue should equal("The result")
}
@ihorvorotnov
ihorvorotnov / get-social-shares
Last active May 26, 2024 08:13
Get number of shares from social platforms
Facebook*:
https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json
+ works, returns shares, likes, comments and total
Twitter:
http://urls.api.twitter.com/1/urls/count.json?url=%%URL%%&callback=twttr.receiveCount
+ v1 API but still works
Reddit:
http://buttons.reddit.com/button_info.json?url=%%URL%%
@parzonka
parzonka / install-gradle-centos.sh
Last active September 9, 2022 20:09
Install gradle on redhat/centos linux
# installs to /opt/gradle
# existing versions are not overwritten/deleted
# seamless upgrades/downgrades
# $GRADLE_HOME points to latest *installed* (not released)
gradle_version=2.9
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
@kevinkarwaski
kevinkarwaski / install-brew.sh
Last active September 13, 2023 21:34
Install Brew and set up for Standard OSX User
#!/usr/bin/env bash
# This script installs brew and chowns the right directories needed to run
# brew as a standard user. Your user should be the owner of /usr/local which
# gets set during the installation of brew. The global homebrew cache directory
# group should be set to 'staff' which is not set during a brew install. This
# script fixes that.
# To begin, you MUST execute this script with your user account while it has
# admin privileges. Once the script completes, you can change your