Skip to content

Instantly share code, notes, and snippets.

@sfelde
sfelde / php-twig-redirect
Created July 18, 2013 00:37
nginx config for twig frontend mini framework redirect
server {
server_name mdtx.dev-ms.in;
sendfile on;
root /srv/mdtx/public_html;
index index.php;
@sfelde
sfelde / bundle-cleanup
Created July 14, 2013 12:51
ruby on rails – bundle reinstall
1
$ rvm gemset empty
Then install them the regular way:
?
1
$ bundle install
You might get an error that looks like this: “There was an error in your Gemfile, and Bundler cannot continue.”. If that’s the case, run:
@sfelde
sfelde / nginx-auth
Created June 9, 2013 13:56
nginx authmod
printf "John:$(openssl passwd -crypt V3Ry)\n" >> .htpasswd # this example uses crypt encryption
location / {
auth_basic "Restricted";
auth_basic_user_file htpasswd;
}
url: http://wiki.nginx.org/HttpAuthBasicModule
@sfelde
sfelde / elasticsearch-mac-brew
Created May 31, 2013 10:50
elasticsearch commands
==> Downloading https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.1.tar.gz
######################################################################## 100,0%
==> Caveats
Data: /usr/local/var/elasticsearch/elasticsearch_sfelde/
Logs: /usr/local/var/log/elasticsearch/elasticsearch_sfelde.log
Plugins: /usr/local/var/lib/elasticsearch/plugins/
To have launchd start elasticsearch at login:
ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
Then to load elasticsearch now:
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.6.deb
sudo dpkg -i elasticsearch-0.20.6.deb
@sfelde
sfelde / apache 80 problem
Last active December 17, 2015 00:38
solve apache problem
sudo netstat -ap | grep '80'
tcp6 0 0 :::80 :::* LISTEN 18712/apache2
git remote add --track master source git://github.com/openstack/tempest.git
git fetch source
git merge source/master
git push
@sfelde
sfelde / grid_ts.ts
Last active December 16, 2015 11:49
tt_content.gridelements_pi1.20.10.setup {
3 < lib.gridelements.defaultGridSetup
3 {
prepend = COA
prepend {
10 = TEXT
10 {
data = field:flexform_headline
typolink.parameter.data = field:flexform_link
wrap = <h3>|</h3>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<ROOT type="array">
<type>array</type>
<el type="array">
<headline type="array">
<TCEforms type="array">
<label>Überschrift</label>
<config type="array">
<type>input</type>
CREATE DATABASE dbname
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;