Skip to content

Instantly share code, notes, and snippets.

vim ~/.bash_profile
alias ll='ls -lGaf'
@iesen
iesen / git-change-author-of-single-commit.sh
Last active August 29, 2015 14:15
git-change-author-of-single-commit.sh
#!/bin/sh
#
# Change the author name and/or email of a single commit.
#
# change-author [-f] commit-to-change [branch-to-rewrite [new-name [new-email]]]
#
# If -f is supplied it is passed to "git filter-branch".
#
# If <branch-to-rewrite> is not provided or is empty HEAD will be used.
/*!
* Grunt
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev
*/
module.exports = function(grunt) {
grunt.initConfig({
// Sass
@iesen
iesen / blog-angularhttp-3
Created October 25, 2014 08:54
blog-angularhttp-3
// /mysite/foo/<fooId>?name=query Eğer fooId non-ascii karakter içeriyor ise encode edilecektir
$http.get("/mysite/foo/" + encodeURIComponent(fooId), {
params: { name : query }
})
.then(function(data) {
});
@iesen
iesen / blog-angularhttp-2
Last active August 29, 2015 14:08
blog-angularhttp-2
// /mysite/foo?name=queryDegeri şeklinde istek oluşacak ve parametre değeri url encode edilecektir.
$http.get("/mysite/foo", {
params: { name : query }
})
.then(function(data) {
});
@iesen
iesen / blog-angularhttp-1
Last active August 29, 2015 14:08
blog-angularhttp-1
// **** Karakter problemi ile karşılaşılır ****
// Eger 'query' non-ascii karakter icerirse server a doğru karakterler gitmez
$http.get("/mysite/foo?name=" + query)
.then(function(data) {
});
...
<profiles>
<profile>
<id>production</id>
<properties>
<spring.profiles.active>production</spring.profiles.active>
</properties>
</profile>
<profile>
<id>development</id>
# This config file is processed on servlet initialization to activate profile for spring application context
spring.profiles.active=${spring.profiles.active}
public class WebAppInitializer implements WebApplicationInitializer {
private static final Logger logger = LoggerFactory.getLogger(WebAppInitializer.class);
public static final String PROFILE_CONFIG_FILE = "/config/profile.config";
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
try {
// Access profile config file for active profile
Properties properties = new Properties();