Skip to content

Instantly share code, notes, and snippets.

View ismnoiet's full-sized avatar

ismnoiet

  • Planet Earth
View GitHub Profile
@ismnoiet
ismnoiet / jqueryCode.js
Created August 3, 2014 15:19
jquery code that helps us to make simple vertical slider
$(document).ready(function(){
var begin = 1;
var end = 5;
var total =0;
$('.item').each(function(){total++;});
// now total contains the number of retrieved rows
for(i=end+1;i<=total;i++){
$("#"+i).appendTo($("#next"));
@ismnoiet
ismnoiet / print_php_array.sublime-macro
Created August 13, 2014 20:13
display php arrays in a nice form [write print_r($array) you get echo '<pre>'.print_r($array,true).'</pre>' which is nicer and cleaner to see
[
{
"args": null,
"command": "exit_visual_mode"
},
{
"args":
{
"commands":
[
@ismnoiet
ismnoiet / entry
Last active November 10, 2022 17:39
read text from file in C
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
@ismnoiet
ismnoiet / remove-mysq-ubuntu.txt
Created July 21, 2015 13:38
uninstall mysql ubuntu
source: http://askubuntu.com/questions/172514/how-do-i-uninstall-mysql
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
@ismnoiet
ismnoiet / .jscsrc
Created August 11, 2015 18:45
js code style for jscs it should be installed in each project separaratelly in order to work
{
"excludeFiles": ["node_modules/**", "bower_components/**"],
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
{
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"es3": false,
"forin": true,
"freeze": true,
"immed": true,
@ismnoiet
ismnoiet / gist:5d814aa059317e501e18
Created September 11, 2015 23:18
update-nodejs-to-last-version
@source:http://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
1) append to the end of the ~/.bashrc file
alias gogo="sudo chmod -R 0777 $dest"
2)make bashrc as the current source, in order to consider tha latest modification
source ~/.bashrc
3) give a value for the dest variable
dest="something"
4) call the gogo alias with the value of dest
gogo
sudo apt-get install python-pip
pip install Pygments
pygmentize -f rtf code/i/want/to/highlight.sh > hightlighted_code.rtf
credit:
http://stratus3d.com/blog/2015/08/21/inserting-code-samples-into-libreoffice-impress/
// first include underscore,backbone and backbone.localStorage
//<script src="bower_components/underscore/underscore.js"></script>
//<script src="bower_components/backbone/backbone.js"></script>
//<script src="bower_components/backbone.localStorage/backbone.localStorage.js"></script>
// 1) defining the model
var Model = Backbone.Model.extend({
defaults:function(){
return {
note:"hello"