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
@bryhaw
bryhaw / git add -A
Created February 10, 2014 00:53
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
<?php
class Brainfuck
{
public $ref;
function &__get($x) {
$this->ref = new class($this->ref) {
private $p;
@hayley
hayley / .htaccess
Created March 3, 2011 18:59
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]
@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'>
/**
* @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)
{
@skrb
skrb / Test.java
Created April 8, 2012 02:04
JavaFX WebView Sample
import java.io.IOException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Test extends Application {
@petrbel
petrbel / .travis.yml
Last active October 26, 2019 10:29 — forked from iedemam/gist:9830045
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/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
@RafalSladek
RafalSladek / .gitlab-ci.yml
Last active July 18, 2021 11:59
gitlab ci file for gulp build pipeline with the latest nodejs
image: node:latest
cache:
paths:
- node_modules/
before_script:
- npm install
stages:
Install fsnotifier for IntelliJ IDEA on your ARM laptop.
Works better than one might expect with JDK8.
Usage:
$ sh fsnotifierto.sh /opt/idea/bin/
...
Sorry for the truncate insanity.
@alexislucena
alexislucena / fix-errors-tomcat-netbeans-ubuntu.md
Last active March 27, 2023 11:02
Fix access errors to Tomcat in NetBeans and Ubuntu

The CATALINA_BASE cant't be read / The <CATALINA_HOME>/conf/server.xml can't be read

$ sudo chown -R USERNAME /var/lib/tomcat8
$ sudo chown -R USERNAME /usr/share/tomcat8
$ sudo chown -R USERNAME /etc/tomcat8
$ sudo chown -R USERNAME /var/log/tomcat8