This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Github : @AdoPi | |
########################################### | |
# OSX - Zelda battery indicator by @AdoPi # | |
########################################### | |
zmodload zsh/mathfunc | |
# HEART CONSTANTS | |
# 💙 💜 💛 💚 ♡ ♥ ❤ | |
NB_LIVES=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT='%{$fg[blue]%}λ %{$fg[yellow]%}%n%{$fg[yellow]%}@%m %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%}) %{$reset_color%}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd dir_project | |
#write your code after that: | |
qmake -project | |
#create the makefile and compile the code | |
qmake -makefile | |
make | |
#create a dmg which contains your gorgeous app! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import javax.swing.*; | |
import java.io.*; | |
import javax.imageio.ImageIO; | |
import java.awt.image.BufferedImage; | |
public class Panel extends JPanel { | |
/** | |
* Save the Panel as image with the name and the type in parameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = SessionSockets; | |
function SessionSockets(io, sessionStore, cookieParser, key) { | |
key = typeof key === 'undefined' ? 'connect.sid' : key; | |
var sessionSockets = this; | |
this.on = function(event, callback) { | |
return bind(event, callback, io.sockets); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// load all grunt tasks | |
require('load-grunt-tasks')(grunt); | |
// Configure Grunt | |
grunt.initConfig({ | |
//it will allow to run nodemon and watch at the same time | |
concurrent: { | |
dev: { | |
tasks: ['nodemon', 'watch'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//handlebarjs | |
var hbs = require('express3-handlebars').create({ | |
helpers: { | |
img: function(name,alt) { return '<img src="images/'+name+'" alt="'+alt+'">';}, | |
styles: function() { | |
//get directory name | |
var fs = require('fs'); | |
var files; | |
/* make the array which will be used for css files*/ | |
files= fs.readdirSync(__dirname+'/public/stylesheets'); |