Skip to content

Instantly share code, notes, and snippets.

@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
[Desktop Entry]
Name=MongoChef
Icon=/home/dhana013/Downloads/mongochef-3.4.1-linux-x64-dist/logo_pro_256.png
Exec=/home/dhana013/Downloads/mongochef-3.4.1-linux-x64-dist/bin/mongochef.sh
Type=Application
Categories=Application;Development;Mongo;Database
Terminal=false
@adeekshith
adeekshith / .git-commit-template.txt
Last active October 20, 2024 21:10 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@zulhfreelancer
zulhfreelancer / index.html
Created February 8, 2016 18:41
How to load external website page using iFrame with a fixed top bar? // Demo: http://embed.plnkr.co/iQQPh92IMjCUoeKK6dac/ // Reference: https://perishablepress.com/embed-external-content-via-iframe-and-div/
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="position:absolute; left:77; top:77; width:377; height:377; clip:rect(0,381,381,0); background:#FFF;">
<div class="fixed">FIXED NAVIGATION BAR</div>
@gornostal
gornostal / Unicode.md
Created November 22, 2015 10:15
Python 2.7. Unicode Errors Simply Explained

Python 2.7. Unicode Errors Simply Explained

I know I'm late with this article for about 5 years or so, but people are still using Python 2.x, so this subject is relevant I think.

Some facts first:

  • Unicode is an international encoding standard for use with different languages and scripts
  • In python-2.x, there are two types that deal with text.
    1. str is an 8-bit string.
  1. unicode is for strings of unicode code points.
@kymtwyf
kymtwyf / bash: cannot create temp file for here-document: No space left on device.md
Created November 14, 2015 14:46
bash: cannot create temp file for here-document: No space left on device

参考 很奇怪的事情

cd /m 

之后打了一个tab给我提示:

bash: cannot create temp file for here-document: No space left on device

查了一圈之后找到答案:(具体原因不明,需要以后查看)

@ibogun
ibogun / gist:ec0a4005c25df57a1b9d
Last active February 2, 2021 13:26
Installing gcc 4.9 & g++ 4.9 on Ubuntu 12.04 OR Ubuntu 14.04
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
@wassname
wassname / SnowCastleStemmer.py
Last active April 8, 2019 08:52
A wrapper around the nltk snowball stemmer with a reverse lookup table
import ntlk
class SnowCastleStemmer(nltk.stem.SnowballStemmer):
""" A wrapper around snowball stemmer with a reverse lookip table """
def __init__(self, *args, **kwargs):
super(self.__class__, self).__init__(*args, **kwargs)
self._stem_memory = defaultdict(set)
# switch stem and memstem
self._stem=self.stem
@flekschas
flekschas / Install-Cypher-Syntax-Highlight-ST3.md
Last active April 11, 2023 03:34
Add Syntax Highlighting for Cypher in Sublime Text 3

Credit goes to

  1. Jan Klaas Kollhof (and Fred Benenson)
  2. Chris Skardon

Installation

Since the original plugin has been developed for Sublime Text 2 we have to install it manually.

  1. Go to https://github.com/fredbenenson/sublime-cypher, download ZIP of the repo, extract the content and rename the folder to ‘Cypher’. You can download the original repo from https://github.com/kollhof/sublime-cypher but Fred Benenson introduced a handy fix for UTF-8 data, which hasn't integrated at the point of this writing.
@duan-li
duan-li / initial_percona_tokudb.sh
Last active August 10, 2017 07:30
Ubuntu 14.04 LTS Percona server and TokuDB setup
#!/bin/bash
# ref-main: https://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html
# ref-main: https://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_installation.html
# ref: https://www.digitalocean.com/community/tutorials/how-to-install-a-fresh-percona-server-or-replace-mysql
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
echo "Type your percona server root pasword:"