Författare: admin

Flera domännamn på samma webserver

Intetsägande bild till den här artikelnHär kan du som utvecklare i LAMP (Linux, Apache, MySQL, PHP) se hur man sätter upp vhosts. vhost används när du vill koppla flera domänadresser till en och samma server som bara har en IP adress.Till exempel kanske du vill ha www.exempel1.com till katalogen /var/www/www.exempel1.com och www.exempel2.com till /var/www/www.exempel2.comJag har tidigare skrivit om hur du sätter upp vhost i MacOS. Det är exakt samma princip i Ubuntu, bara lite andra filnamn.(mer …)

JavaScript – The language without context.

The peanut You received a peanut. You do not have the context. There is no way you know why you received a peanut and what to do with it.If you feel hungry and I have peanuts, you ask me for a peanut, you get a peanut and you eat it. That is context.Lets say you want to do other stuff while you wait for a peanut. You want to surf on your phone. You feel hungry, you say ”I am hungry, can anyone give me a peanut”, and then you start surfing on your phone. I hear your message and I have peanuts, I give you a peanut. When you receive a peanut, then you eat it.Now you do not need to know the extended context. It has been reduced to: ”When you receive a peanut, then you eat it.”. I saw that you reacted this way and found it amusing, so I gave you another peanut, and another…The Chinese businessmen A group of Chinese businessmen have traveled to Sweden to look at a secret new prototype that the Chinese company are developing in Sweden. All information is in need to know basis.The Chinese businessmen have traveled far, they are tired and hungry. Their secret task is to measure the prototype and call a secret buyer and relay the information. If the buyer say OK then the prototype will be shipped to the buyer. The Chinese businessmen are met at the factory by a very polite person. - I am your personal contact person. I will always be at your side while you are here at the factory. The prototype is in the storage. If you give me instructions what to do with the prototype then I promise to execute them.The Chinese businessmen really needed the prototype so they said: - Your instructions are to bring the prototype back here. We will wait. - Yes, I understand.The contact person smiled and stood absolutely still.What can we learn from the peanut and the prototype? In JavaScript there is no way you can hide your context. If you try then you end up with a peanut in your hand and a smiling Swede at your site.(mer …)

Pokemon Go – New features

pokemongoI am a collector, my friends are collectors - we collect Pokemons. When we have all evolutions on a Pokemon we do not want to see that Pokemon again.Collectors do not care much about how powerful the Pokemos are or their abilities. Gyms are not interesting.The fun is to find new Pokemons and to evolve Pokemons and hatch eggs.So as a collector I would like to see some of these features in Pokemon Go.(mer …)

Redis

redisRedis lagrar nyckel+data i minnet och är mycket snabb på just detta. Den används för att få bättre prestanda på webbsidor genom att lagra färdiga resultat i Redis och sedan hämta dem vid behov.Redis hemsida: http://redis.ioI den här guiden ska jag använda Redis + PHP på MacOS 10.11 Jag förutsätter att du har Homebrew installerad på din Mac.Lade även till instruktioner för Ubuntu 17.04(mer …)

Sätta upp vhost på OSX – Apache

vhostNär du surfar till webbservern Apache från ett domännamn så tittar apache i vhost-filen om det domännamnet finns, om det finns i filen så tittar den var domännamnets filer finns på hårddisken och laddar in rätt fil. Om domännamnet inte finns i vhost-filen så använder den grundinställningarna. Källa: getgrav(mer …)

PostgreSQL för MacOS

100x58_1Mitt intresse för PostgreSQL (PSQL) beror på att jag skapar en plattform som ska ha stöd för de mest kända databaserna, PostgreSQL är en av dem. När jag programmerar i övrigt så använder jag aldrig PSQL för den har paradoxalt nog för många finesser som du tvingas ta ställning till när du egentligen bara vill skapa en databas men en tabell och några index. PSQL skulle nog bli mer populär om den kom i en enklare version där bra-nog är ledord.I min plattform kommer du enkelt att kunna använda bland annat PostgreSQL, men det kräver att den är installerad och fungerar. Här berättar jag hur du kommer igång på MacOS 10.11.5Allmänt om PSQL Hemsida: https://www.postgresql.orgWikipedia: https://en.wikipedia.org/wiki/PostgreSQL(mer …)

Felsöka xdebug

xdebugI och med att jag uppgraderade till PHP 7.0 var jag också tvungen att uppgradera till xdebug 2.4. Det var inga problem i Ubuntu 16.04 men när jag gjorde uppgraderingen i OSX 10.11.5 då gick något snett. Det finns många bra guider på nätet för att uppgradera till PHP 7.0 och xdebug, till exempel den här.Den här artikeln är uppdaterad 2017-05-13 efter att jag åter fått felsöka xdebug i MacOS.Så om det nu går fel med xdebug, hur ska man felsöka?(mer …)

Upload gpx map to Garmin

Upload gpx track to Garmin Forerunner 305 from Ubuntu Linux. Working on Ubuntu 11.04 2012-05-01 Working on Ubuntu 13.04 2013-07-05 gpsbabel -i gpx -f Hämtningar/RödLinjeNorsborg-ropsten.gpx -t -o garmin -F usb: It takes some time to transfer. This tips come from:…

CharZam