Skip to content

Instantly share code, notes, and snippets.

View Mr-Kumar-Abhishek's full-sized avatar

Abhishek Kumar Mr-Kumar-Abhishek

View GitHub Profile
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / git add -A
Created October 7, 2015 06:48 — forked from bryhaw/git add -A
Git: Adding and removing untracked/tracked files
git add -A" is equivalent to "git add .; git add -u
The important point about "git add ." is that it looks at the working tree and adds all those paths to the staged changes if they are either changed or are new and not ignored, it does not stage any 'rm' actions.
"git add -u" looks at all the currently tracked files and stages the changes to those files if they are different or if they have been removed. It does not add any new files, it only stages changes to already tracked files.
"git add -A" is a handy shortcut for doing both.
Source: http://stackoverflow.com/questions/572549/difference-between-git-add-a-and-git-add
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / git-remove-history.sh
Created November 20, 2015 09:43
remove large binary files from git history
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
#
# retrieved from: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/
#
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / .travis.yml
Created December 15, 2015 07:25 — forked from petrbel/.travis.yml
Travis-CI submodules
# Use https (public access) instead of git for git-submodules. This modifies only Travis-CI behavior!
# disable the default submodule logic
git:
submodules: false
# use sed to replace the SSH URL with the public URL, then init and update submodules
before_install:
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / arduino_robot
Created December 21, 2015 06:12 — forked from whyisjake/arduino_robot
Arduino Robot Code
/*
Original code by Nick Brenn
Modified by Marc de Vinck
Make Projects Arduino-based 4WD robot
http://makeprojects.com/Project/Build-your-own-Arduino-Controlled-Robot-/577/1
*/
#include <AFMotor.h>
AF_DCMotor motor1(1, MOTOR12_8KHZ);
AF_DCMotor motor2(2, MOTOR12_8KHZ);
AF_DCMotor motor3(3, MOTOR12_1KHZ);
/**
* @brief executeQueriesFromFile Read each line from a .sql QFile
* (assumed to not have been opened before this function), and when ; is reached, execute
* the SQL gathered until then on the query object. Then do this until a COMMIT SQL
* statement is found. In other words, this function assumes each file is a single
* SQL transaction, ending with a COMMIT line.
*/
void executeQueriesFromFile(QFile *file, QSqlQuery *query)
{
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / HelloWebView.java
Created March 25, 2016 06:19 — forked from ToddG/HelloWebView.java
Simplified JavaFX Example
package hellowworld;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.concurrent.Worker;
import javafx.geometry.HPos;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.Scene;
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / JQueryWebView.java
Created March 28, 2016 10:46 — forked from jewelsea/JQueryWebView.java
Embeds jQuery in a document loaded into a WebView.
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import org.w3c.dom.Document;
/**
<?php
class Brainfuck
{
public $ref;
function &__get($x) {
$this->ref = new class($this->ref) {
private $p;
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / meta-tags.md
Created April 18, 2016 21:13 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / .htaccess
Created September 3, 2016 19:21 — forked from hayley/.htaccess
jekyll deploy with tidy and gzip
## place this file in the root of your jekyll directory so that it gets copied over to
## _site automatically
RewriteEngine on
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [L]