Skip to content

Instantly share code, notes, and snippets.

View xamfy's full-sized avatar
🏄‍♂️

Pratyaksh xamfy

🏄‍♂️
View GitHub Profile
@xamfy
xamfy / curl.md
Created February 24, 2018 03:53 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@xamfy
xamfy / angular-travis-ci.yml
Created March 3, 2018 10:15 — forked from AhsanAyaz/angular-travis-ci.yml
Sample TravisCI Yaml file for Angular Project
language: node_js
node_js:
- "7"
sudo: true
dist: trusty
branches:
only:
- master
@xamfy
xamfy / fork forced sync
Created March 5, 2018 12:48 — forked from glennblock/fork forced sync
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master
@xamfy
xamfy / redux_setup.md
Created March 7, 2018 17:30 — forked from kiok46/redux_setup.md
Redux, store, actions and reducers setup along with explanation.

Redux Setup

Implementation of redux inside any react.js or react-native application,

  • we will create an instance of the redux store.
  • We are going to create a provider tag from react redux library
  • Then render that provider tag passing in the store as a prop, then any child component to this provider tag will have access to this store through the context system inside of react.
  • import { Provider } from ‘react-redux’; // In main.js
  • to create a store create one in a separate folder.
@xamfy
xamfy / react-native-gitignore
Created March 13, 2018 20:01 — forked from ryantbd/react-native-gitignore
react-native-gitignore
# Most part of this file is created by https://www.gitignore.io
### Node ###
# Logs
logs
*.log
# Runtime data
pids
*.pid
import React from 'react';
import ReactDOM from 'react-dom';
import {connect} from 'react-redux';
import {itemsFetchData} from '../actions/items';
class ItemList extends React.Component {
// constructor() { super(); this.state = { items: [],
// hasErrored: false, isLoading: false }; } fetchData(url) {
// this.setState({isLoading: true}); if (!response.ok) {
// fetch(url).then((response) => { throw Error(response.statusText);
@xamfy
xamfy / input_data.py
Created May 8, 2018 09:02 — forked from awjuliani/input_data.py
Script to download MNIST dataset.
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@xamfy
xamfy / ngrxintro.md
Created May 17, 2018 11:41 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@xamfy
xamfy / vagrant-cheat-sheet.md
Created May 19, 2018 21:09 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)

Keybase proof

I hereby claim:

  • I am xamfy on github.
  • I am xamfy (https://keybase.io/xamfy) on keybase.
  • I have a public key ASC2u0LzPV499pl7Psw9HAeO1q01JZ_KdkfxRJsv2JsWZwo

To claim this, I am signing this object: