Skip to content

Instantly share code, notes, and snippets.

View Himansh1306's full-sized avatar
🎯
Focusing

Himanshu Rathore Himansh1306

🎯
Focusing
View GitHub Profile

How To - Upload and add Images to markdown files in Gist

Markdown files allow embedding images in it. However it requires the image to be hosted at some location and we can add the url of the image to embed it.

Example: ![Alternate image text](https://someurl/imagelocation/image.png)

We can use services like imgur or other services to host the images and use the hosted URL.

@Himansh1306
Himansh1306 / README.md
Created July 14, 2018 08:08 — forked from pyk/README.md
Install Oracle java 8 on debian jessie

Run

wget https://gist.github.com/pyk/19a619b0763d6de06786/raw/b09ce3a6626484adb5339597dfd391d0db9fe3cb/install-oracle-java-8-on-debian-jessie.sh
sh install-oracle-java-8-on-debian-jessie.sh

See the following blog post

@Himansh1306
Himansh1306 / install-docker-ubuntu.md
Created July 20, 2017 06:25 — forked from subfuzion/install-docker-ubuntu.md
Installing Docker on Ubuntu

Installing with apt-get

#!/bin/sh
# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 | grep [email protected] || exit 1
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
@Himansh1306
Himansh1306 / pr.md
Created May 4, 2017 07:37 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@Himansh1306
Himansh1306 / gist:a61b21243fc5f66dd41554a5ee7eeb1c
Created June 24, 2016 09:02 — forked from dasgoll/gist:f5b294e0c9924900fc79
Cassandra CQL cqlsh supported version
[root@dev-etl apache-cassandra-2.2.3]# cd bin/
[root@dev-etl bin]# ./cqlsh cassandra1.kafkacluster100.com -u dwhuser -p 'password'
Connection error: ('Unable to connect to any servers', {'cassandra1.kafkacluster100.com': ProtocolError("cql_version '3.3.1' is not supported by remote (w/ native protocol). Supported versions: [u'3.3.0']",)})
[root@dev-etl bin]# ./cqlsh cassandra1.kafkacluster100.com -u dwhuser -p 'password' --cqlversion=3.3.0
Connected to kafkacluster100 at cassandra1.kafkacluster100.com:9042.
[cqlsh 5.0.1 | Cassandra 2.2.1 | CQL spec 3.3.0 | Native protocol v4]
Use HELP for help.
dwhuser@cqlsh>
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = YES
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
APPLE_INTERNAL_DIR = /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
@Himansh1306
Himansh1306 / crashlyticsInfo.sh
Created October 24, 2015 13:06 — forked from patrickhammond/crashlyticsInfo.sh
Simple script to display info associated with your Crashlytics account.
#!/bin/sh
echo "Crashlytics username (e-mail):"
read email
echo "Crashlytics password:"
read -s password
data="{\"email\":\"${email}\",\"password\":\"${password}\"}"
@Himansh1306
Himansh1306 / crashlytics_orgs.rb
Created October 24, 2015 13:06 — forked from codebutler/crashlytics_orgs.rb
Crashlytics requires an IDE to "onboard" an Android app for no good reason. This prevents you from setting up a new app using a command line build tools such as Maven, Gradle or unsupported IDEs such as Android Studio. Turns out all you really need is your org's api key, which you can get using this script. Then just add this to your AndroidMani…
require 'httparty'
require 'json'
class Crashlytics
include HTTParty
base_uri 'https://api.crashlytics.com/api/v2'
def session(email, password)
self.class.post('/session.json',
body: {email: email, password:password}.to_json,