Skip to content

Instantly share code, notes, and snippets.

@ishu3101
ishu3101 / docker_setup_windows.sh
Created Jul 10, 2017
Installing docker on Windows
View docker_setup_windows.sh
# install docker on windows
chocolatey install docker
chocolatey install docker-machine
chocolatey install docker-compose
@ishu3101
ishu3101 / index.html
Created Jun 24, 2017
List all the users github repository using javascript only
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Github Repository</title>
</head>
<body>
<script>
var username = "ishu3101";
@ishu3101
ishu3101 / .gitlab-ci.yml
Created Jun 8, 2017
Run PowerShell Command/Script from a .gitlab-ci.yml file on a gitlab.com using the Gitlab CI
View .gitlab-ci.yml
image: philippheuer/docker-gitlab-powershell
test:
stage: test
script:
# run PowerShell script
- powershell -File build.ps1
# run PowerShell Command
- powershell -Command "Get-Date"
@ishu3101
ishu3101 / programming_quote.py
Created May 29, 2017
Generate a Random Programming Quote using an API
View programming_quote.py
#!/usr/bin/python
import urllib
import urllib2
import random
import json
# get a random programming quote using an api
url="http://quotes.stormconsultancy.co.uk/random.json"
@ishu3101
ishu3101 / compile_latex.sh
Last active May 11, 2017
Compile latex files online using http://latexonline.cc
View compile_latex.sh
# Compile latex files online using https://latexonline.cc
# Overleaf
# Usage
https://latexonline.cc/compile?git=https://git.overleaf.com/{id}&target={filename}.tex
# Example
https://latexonline.cc/compile?git=https://git.overleaf.com/9212267nmctrvktqxnf&target=main.tex
# Github
View social_share.csv
Twitter https://twitter.com/intent/tweet?url={url}
Facebook https://facebook.com/sharer/sharer.php?u={url}
Google+ https://plus.google.com/share?url={url}
Linkedin https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}
Reddit https://www.reddit.com/submit?url={url}
@ishu3101
ishu3101 / find-git-repo.md
Created Apr 11, 2017
Find all the git repository inside a directory.
View find-git-repo.md
find . -name .git -type d -exec dirname {} \;
  • . specifies the path to search.
  • -type d makes this only apply to directories.
  • -name ... specifies the name of the directories this should apply to.
  • -exec ... {} + is the command that will be run for each match.
@ishu3101
ishu3101 / share_localhost.sh
Created Apr 4, 2017
Run Localhost on the web. Instantly share your localhost environment!
View share_localhost.sh
# No download required. Run your app on port 8080 and then run this command and share the URL.
# See http://localhost.run for more information.
ssh -R 80:localhost:8080 -p 2222 ssh.localhost.run
@ishu3101
ishu3101 / date_format.vb
Created Mar 13, 2017
Microsoft Word Macro to change all instances of date from 2017-03-15 to March 2017 Format
View date_format.vb
Sub GetDateAndReplace()
Dim FoundOne As Boolean
Selection.HomeKey Unit:=wdStory, Extend:=wdMove
FoundOne = True ' loop at least once
Do While FoundOne ' loop until no date is found
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
@ishu3101
ishu3101 / run_usage.md
Last active Jan 3, 2019
Running Code in different languages, frameworks in [Cloud9](C9.io)
View run_usage.md

jekyll

jekyll serve --port $PORT --host $IP

hugo

hugo server -w --port=$PORT --bind=$IP

hexo

hexo server -p $PORT -i $IP

python