Qua

Reader

A list of all postings of all blogs on Qua where the author has configured the blog to publish on this page.

from Toon Blast Hack - Unlimited Coins And Lives Cheats No Survey

Toon Blast Hack – Unlimited Coins And Lives Cheats No Survey Well, today we are going to provide Toon Blast hack cheats which will provide your unlimited coins within 3-min of your time. Toon Blast is inspired with Candy Crush game and uses the same strategy to level up the game. What makes Toon Blast Unique is the addition of combos which are little different from Candy Crush, you will be addictive when you play Toon Blast levels after levels.

Visit – https://store.gamesdynamo.com/toon-blast-hack-mod-get-coins-and-lives-unlimited/

Go to the site with any device and follow the instructions below to get free Unlimited coins and learn some cool Toon Blast Cheats which will help you clear the levels fast.

Toon blast cheat benefits: Choose the amount of coins or lives Enter your nickname Choose your platform Wait the process until finish

 
Read more...

from paranoid

Einleitung – Die Schwierigkeiten

Durch die unzähligen Dienste und Produkte die von uns ein Passwort verlangen ist es schwierig den Überblick zu wahren. Die einfachste Methode, überall das gleiche Passwort zu benutzen, scheitert an den verschiedenen Passwortvorgaben. Die meisten starten mit einem simplen Passwort wie das eigene Haustier Wuschel und landen dann bei Passwörtern wie Wu$chel1234. So entsteht die Kombination eines schwachen Grundpassworts mit der Schwierigkeit sich die verschiedenen Variationen zu merken.

Lesezeit: 8 Minuten

Was macht ein gutes Passwort aus?

Ein Benutzerkonto wird verschieden angegriffen:

  • Brute-Force-Methode – Das Ausprobieren von verschiedenen Passwortkombinationen
  • Wörterbuchangriff (engl. dictionary attack) – Das Ausprobieren von Passwörtern aus einer Liste. Bestehend zum Beispiel aus den beliebtesten Passwörtern, Namen, Geburtstage, Substitutionen (z. B. $ statt S) und Wörter aus einem Standard Wörterbuch.
  • Social Engineering – Der Angreifer manipuliert den Passwortinhaber, um an dessen Daten zu gelangen. Ein Angreifer kann sich als Techniker ausgeben, viele kennen den Anruf eines falschen Microsoft Mitarbeiters, auch Phishing und das gezielte Spear-Phishing gehört zum Social Engineering.
  • Datenleck – wenn bei mehreren Diensten das gleiche Login benutzt wird, besteht die Gefahr, dass wenn ein Login in die falschen Hände gelangt auch die anderen Accounts frei zugänglich sind. Der Angreifer testet oft die neu erlangten Zugangsdaten von einer kleinen unsicheren Webseite bei Anbietern mit vielen Benutzern wie Google, Amazon und Microsoft.

Wahl des Passwortes

  • mehr als 11 Zeichen
  • Mischung aus Kleinbuchstaben, Großbuchstaben, Zahlen und Symbole
  • keine bekannten Wörter, Namen, Daten, etc.
  • keine bekannten Ersetzungen wie $ anstatt S oder 0 anstatt O
  • keine Tastaturmuster wie qwertz oder asdf1234
  • nichts Persönliches wie Haustier, Geburtsdatum oder Hobby
  • keine Wiederholung des Passwortes

Ein paar der beliebtesten Passwörter der Deutschen: 123456, hallo123, ficken, passwort, master.

Einschätzung der Passwortstärke

Die Lösung: Der Passwortmanager

Die sichersten Passwörter sind die, die man nicht kennt. Möglich macht dies ein Passwortmanager. Das einzige Passwort, dass man sich merken muss, ist der Zugang in den Passwortmanager. Einmal drin verfügen wir über den Zugriff auf alle Passwörter und können diese nach Belieben kopieren und einfügen oder je nach Software auch automatisch einfüllen lassen. Die Passwörter können durch den im Passwortmanager meist integrierten Passwortgenerator erstellt werden. Wenn wir diesen zum Beispiel auf 26 Symbole stellen erhalten wir etwas wie $/-u+U,S@b'W8#^&9ZTRFXsW!@.

Schutz vor unbefugtem Zugriff

Jeder Passwortmanager sollte eine Zwei-Faktor-Authentifikation haben und diese sollte unbedingt eingeschaltet sein (mehr zur Zwei-Faktor-Authentifikation weiter unten). Passwortmanager sollten sich nach einer kurzen Zeit selbst abmelden und zum wieder anmelden das volle Passwort verlangen. Weiter hilft die Präfix-Strategie (unten erwähnt) den Passwortmanager sicherer zu machen.

Schutz vor Datenverlust

Da wir die meisten unserer Passwörter nicht mehr auswendig wissen ist ein Backup nötig. Wir empfehlen einerseits ein integriertes verschlüsseltes Backup des Passwortmanagers zu nutzen und dazu regelmäßig ein Export und Import in einen zweiten Passwortmanager zu vollziehen. So besteht eine Unabhängigkeit dem Passwortmanager gegenüber.

Welchen Passwortmanager?

LastPass

Der bekannteste Passwortmanager ist wohl LastPass. Technisch sehr ausgetüftelt mit regelmäßigen Audits und Tests von dritten Quellen. Die größten Negativpunkte sind der Closed Source Code und die große Angriffsfläche durch die vielen Features wie Cloudsync, Passwortsharing, Fingerabdruckzugang und Browserextensions mit Autofill. Hinter LastPass steckt die Firma LogMeIn. In einem Businessumfeld können die zusätzlichen Funktionen einem Mehrwert dienen. Wir empfehlen LastPass aufgrund des proprietären Quellcodes jedoch zu meiden.

Bitwarden

Bitwarden ist ein Open Source Passwortmanager mit Sync in die Cloud oder auf den eigenen Server. Der kostenlose Standard Account bringt alles mit, was zur komfortablen Passwortorganisation benötigt wird. Wir empfehlen Bitwarden allen die auf einen Cloudsync und/oder eine Browsererweiterung nicht verzichten wollen.

KeePass

Mit den wenigsten Features und deshalb am leichtesten gegen Angriffe zu verteidigen ist KeePass. Open Source ohne integrierten Cloud Service, offline. Da es sich bei einer KeePass Datenbank um eine einzelne Datei handelt, ist eine Synchronisation über etwa einen Cloud Speicher kein Problem. Auch gibt es viele Plugins, Forks und auch Browsereraddons die KeePass erweitern. Wir empfehlen auf diese zu verzichten da sie meist von dritten programmiert wurden und die Angriffsfläche unnötig vergrößern. KeePass ist für jeden der mit wenig Funktionen auskommt und für jeden für den Sicherheit und Privatsphäre an erster Stelle stehen. Auch ganz praktisch als Backup – KeePass hat eine Importfunktion für die meisten Passwortmanager inklusive LastPass und Bitwarden.

LastPass Bitwarden KeePass
Erscheinungsjahr 2008 2016 2003
Lizenz Proprietär Open Source Open Source
Speicherort Cloud Cloud / Selbst Lokal
Browsererweiterung Ja Ja Nein (inoffiziell)
Externer Audit Ja Ja Ja
Standard Gratis Gratis Gratis
Premium pro Jahr 36 $ 10 $ Spendelink

Spezialfälle

Auswendig gelernte Passwörter

Es gibt ein paar wenige Passwörter, die man sich trotz Passwortmanager immer noch merken muss. So zum Beispiel das Login des Computers, auf dem der Passwortmanager installiert ist. Möglicherweise hat jemand auf der Arbeit keinen Zugriff auf den Passwortmanager. Falls der Passwortmanager auf dem Smartphone besteht können die Passwörter im schlimmsten Fall abgeschrieben werden. Das ist aber sehr mühsam, wenn das Passwort $kJu7tF44Ad!4$1Jp0+jYYvbm?0 ist. Übrigens auch nicht sehr praktisch als W-LAN Passwort das dann dem Besuch vorgelesen wird.

Wir wählen in diesem Fall ein Passwort, dass wir uns merken können, lange ist und nicht in einem Lexikon vorkommt – 1SchornsteinSalatBein! oder KabeljauSchwimmWeste. Sätze sind auch möglich – PeterMachtSauber!, 19WaleSingenSchräg? (Wobei der Umlaut nicht bei allen Passwortvorgaben erlaubt ist). Wer einen Schritt weitergehen möchte, kann zusätzlich das unten erwähnte Präfix benutzen um auf einfache Weise ein paar Symbole und Zahlen mit einzumischen.

Geheimfragen

Geheimfragen werden von manchen Anbietern genutzt, um Benutzer zu identifizieren die ihr Passwort vergessen haben. Meistens sind es drei persönliche Fragen, die jeder Kindheitsfreund für einem beantworten könnte. Geheimfragen abzusichern ist einfach – Man lügt, was das Zeug hält. Was ist Ihre Lieblingsfarbe? die HamsterUmlaufTaxe, In welcher Stadt sind sie geboren? eineWinzige Sahnetorte ohne Essiggurken. Die Fragen plus Antworten werden nicht etwa auswendig gelernt und wieder verwendet, sondern im Passwortmanager abgespeichert. Es ist besser etwas Aussprechbares zu wählen, falls man tatsächlich eine Person am Apparat hat bei der Passwort Rücksetzung.

Wer jetzt denkt, warum speichere ich den Weg das vergessene Passwort zurückzusetzen mit dem eigentlichen Passwort ab? Weil wir die Sicherheitsfragen nicht brauchen, da wir eben einen Passwortmanager nutzen, aber die Fragen aufgezwungen bekommen (etwa bei einem Microsoft Account). Wer auf Nummer sicher gehen möchte, kann seine Fragen und Antworten an einem anderen verschlüsselten Ort lagern als das Passwort.

Zwei-Faktor-Authentifikation

Viele Anbieter bieten mittlerweile eine Identifizierung durch zwei Stufen an (engl. Two Factor Authentication, kurz 2FA). Die zweite Authentifikation erfolgt meist durch ein Gerät, ein SMS Code oder eine App. Im Idealfall handelt es sich um ein TOTP (Time-based One-time Password) Code den man mit einer beliebigen Open Source 2FA App einrichten kann.

Der entsprechende Anbieter des TOTP bietet einem in der Regel einen QR-Code an. Wir empfehlen einen Screenshot von dem QR-Code und den oft verwendeten Recovery Keys zu machen und diese sicher in einem Passwortmanager oder verschlüsseltem Archiv abzuspeichern die vom normalen Passwortmanager getrennt sind. Zum Beispiel eine KeePass Datei die alleine für 2FA Codes erstellt wurde. Wenn alles sicher verstaut ist, kann der QR-Code mit der 2FA App gescannt werden. Nun wird beim nächsten Login der sich nach kurzer Zeit ändernde Code abgefragt und das Login besteht nun aus einem weiteren Faktor. Etwas das wir wissen, das Passwort und etwas das wir haben, unser Smartphone. Ein dritter Faktor wäre etwas das wir sind – Fingerabdruck und Gesichtserkennung gehören dazu. Diese Art der Identifizierung sollte nicht als einziger Faktor benutzt werden, da sie oft ausgetrickst werden kann und der Benutzer einfach gezwungen werden kann etwa sein Smartphone per Fingerabdruck zu öffnen.

Im F-Droid Store gibt es verschiedene Open Source Apps für 2FA wie zum Beispiel Aegis.

Eine Liste von Diensten die Zwei-Faktor-Authentifikation unterstützen.

Erhöhte Sicherheit

Catch-All

Eine Catch-All ist im E-Mail-Jargon eine Adresse, die alle E-Mails abfängt die an eine nicht existierende Adresse einer Domain gehen. Also wenn wir eine Domain haben rhesusaeffchen.de haben wir uns einmal info@rhesusaeffchen.de eingerichtet und einmal eine Catch-All all@rhesusaeffchen.de (wird verschieden dargestellt). Wenn uns jemand an die info Adresse schreibt, landet die Nachricht auch dort, allesandere@rhesusaeffchen.de aber landet in der Catch-All Adresse. Damit können wir bei jedem Login eine eigene Adresse wählen. Zum Beispiel also landet paypal@rhesusaeffchen.de im genau gleichen Postfach wie horstswurstwaren@rhesusaeffchen.de. Wir empfehlen der Durchschaubarkeit halber nicht servicename@rhesusaeffchen.de zu wählen, sondern etwas Zufälliges wie uh7hnas54@rhesusaeffchen.de und diesen Benutzernamen dann im Passwortmanager unter dem Account abzuspeichern.

Wer keine eigene Domain hat, kann je nach Anbieter etwas Ähnliches umsetzen. Bei gmail zum Beispiel kann ein + vor die eigentliche Adresse eingesetzt werden. Also aus kronkorken@gmail.com wird paypal+kronkorken@gmail.com oder einhorn+kronkorken@gmail.com und alles landet in der gleichen Inbox.

Der Vorteil dieser einmaligen Adresse pro Service ist, dass ein Angreifer der ein Login hat, es nicht bei einem anderen Login ausprobieren kann. Weiter hat es den Nebeneffekt, dass wir wissen wer unsere Daten verkauft hat oder ein Datenleck hat, sobald wir Spam auf eine Adresse erhalten. Infizierte Adressen können gesperrt werden, was weniger Spam in der Inbox bedeutet.

Präfix

Wir definieren eine Zeichenfolge die wir jedem Passwort voranstellen und nie im Passwortmanager abspeichern, den Präfix. Das Passwort das wir bei der Registrierung eines Services eingeben ist Präfix + generiertes Passwort.

Als Beispiel, unser konstante Präfix ist 13$tH. Wir registrieren uns bei zwei Online-Accounts und generieren die Passwörter l0$Gb5Acy81PfRvHaYb7 und P5fVa&vy$q91JbyZ5%OlkNbG. Die generierten Passwörter werden im Passwortmanager zusammen mit den Benutzernamen abgespeichert. Wir fügen die entsprechenden Passwörter bei der Registrierungsmaske ein und fügen zusätzlich unser Präfix ein. Wir erhalten 13$tHl0$Gb5Acy81PfRvHaYb7 und 13$tHP5fVa&vy$q91JbyZ5%OlkNbG. Beim Einloggen füllen wir durch den Passwortmanager die uns unbekannte Zeichenfolge ein und fügen anschließend den uns bekannten Präfix ein.

Somit schützen wir uns durch einen weiteren Faktor (etwas das wir wissen) falls jemand Zugriff auf unseren Passwortmanager erlangen sollte, wenn wir uns zum Beispiel vergessen haben auszuloggen. Der Angreifer hat unvollständige Passwörter und muss zuerst wissen, dass wir diese unübliche Strategie nutzen und dann mindestens zwei komplette Passwörter erhalten und diese vergleichen.

Zusammenfassung

Wir hoffen auf eine passwortfreie Zukunft. Wie diese aussehen könnte, zeigt uns etwa SQRL. Bevor es eine massentaugliche Lösung gibt, muss jedoch ein Kompromiss aus Benutzerfreundlichkeit und Sicherheit her.

Um unsere Accounts besser zu schützen, gilt es lange, komplexe und einmalige Passwörter zu wählen, wenn möglich die Zwei-Faktor-Authentifikation einzuschalten und als Bonus kann die oben erwähnte Catch-All Strategie umgesetzt werden.

Ein Passwortmanager bildet ein plus an Benutzerfreundlichkeit und auch an Sicherheit, aber bietet einen Single Point of Failure – wenn jemand drin ist, hat er eine fein säuberliche Liste mit all unseren Accounts und Passwörtern. Um den Passwortmanager selbst zu schützen, benötigt es ein sehr starkes Passwort und Zwei-Faktor-Authentifikation. Weiter sollten von den Sicherheitseinstellungen im Passwortmanager Gebrauch gemacht werden wie die automatische Abmeldung des Managers nach einer gewissen Zeit. Als Bonus kann die oben erwähnte Präfix Strategie eingesetzt werden.

Originalartikel

 
Read more...

from theblacksquid's random thoughts

We need a ground campaign!

The world is on fire.

Revolutions are happening all over the so-called “Third-World”, calling for the downfall of the neoliberal order, all while the global north does what it can to fan out the raging flame. For the first time in decades, socialist ideas are actually on the table in both the US and the UK. China's economic dominance is weakening and people can feel it. All of a sudden, it feels like revolution is finally in the fucking air.

In the Philippines, a palpable amount of discontent over the current administration's backdoor deals with China resulting in them selling the nation out in all but name as well as the thousands killed during his so called “War on Drugs”. The fact that the 30th ASEAN Games is being compared to Fyre Fest is just so much icing on this shit cake. And if we, leftists and especially Libertarian Socialists, move carefully but quickly, we might just be able to catch up with the rest of the world.

But how do we do that?

We organize, of course. But how exactly does one go about that?

There are two basic methodologies that we could use to achieve that. They are essentially the same if you look at them closely enough, but the theories and thought processes that went into formulating them are diverse enough that they warrant being discussed as two separate strategies.

First is the Mass Line.

Mass Line

Originating in Mao Tse-Tung's interpretation of how the Marxist-Leninists achieved victory in the October Revolution, this process is used to provide a leadership of the masses that is “from the masses, and to the masses”. This means taking the ideas of the masses, concentrating them and finally going back to the masses to explain and propagate these ideas in order to drum up action.

Let's break this down:

  1. Gather: Go out into your community, preferably in groups, and each organizer would speak to the locals about what they think about a certain issue, if you're organizing around a single issue, or what their concerns are about their community, their livelihood, etc. Make sure to let them do most of the talking and ask them open-ended questions.

  2. Concentrate: Regroup with all of your fellow organizers and find a common narrative in the information you guys have gathered. Interpret it using a critical framework relevant to the issues found. Formulate solutions based on the narrative and your group's interpretation of it.

  3. Return: Explain and promote your group's findings and your proposed solutions to the issues that were raised using a variety of tactics. Wheatpaste posters, social media, and good old one-on-one conversations with many of the same people you've spoken to about the issues being discussed. During this phase, one must drum up all the support that you and your comrades could muster for your campaign. A short, memorable slogan is useful in winning mindshare in whatever community you're in.

One must keep in mind that this is an iterative process, and must be repeated sufficiently often in order to not lose sight of the needs of the masses and lose the revolution's foundational strength.

Now, we must keep in mind that this method is optimized for a centralized organization, see how it distinguishes between “organizers” and “community” in all stages of formulating the Mass Line. Not to mention the fact that this is best done by an already organized group. Whether or not having a “vanguard” leading the charge for social change is problematic is not within the scope of this work.

What is within the scope, however, is how you could possibly build a vanguard group, or a network of organized groups working together.

Enter the IWW's Organizing Conversation, AKA...

The A.E.I.O.U.

Developed by the Industrial Workers of the World in order to unionize workplaces and form a One Big Union in order to overthrow capitalism and the state, this method can be easily adapted into many settings and issues.

This can be done with or without a large group assisting you. Although you can certainly perform door-to-door canvassing in the style of the Mass Line, it would not be as effective. This also has the added benefit of, if done correctly, actively including the community or workplace you're organizing into the organization you are building.

Each part has two phases – 10% Introductions and 90% Follow-Up.

And remember, there's no script for doing this correctly, just talk to them as a friend and as a fellow person.

  1. A – Agitate: Begin the conversation by talking about their problems in their workplace or community. Follow the 80:20 principle, let them do most of the talking and ask them open-ended questions. Use leading questions and paraphrasing in order to link their grievances with those in power and how they got their power. Evoke feelings of anger. Anger, being an active emotion, can be directed towards action. Just take care not to fan their flames too hot as to shut down their ability to think!

    • Take note of what grievances and issues that come up in your different conversations, as this will be important later during the Organize phase.

    • After the initial conversation, make sure that their motivation and desire to change their material conditions keep burning. One of the best ways to fuel that is by -

  2. E – Educate: Discuss with them both Theory and Practice.

    • By Theory, discuss with them how and why there is a power imbalance between the community and whatever is causing the issues they're facing. Describe alternatives and socialist solutions. And more importantly, ask them what solutions do THEY see for their concerns. Remember the 80:20 principle.

    • By Practice, discuss how these possible solutions can take shape in the community or workplace you're organizing. Who might be other people interested in the project? Where would be a good place to meet? When should different tasks be done? And, most importantly, why is it important for this project to succeed.

    • And when you follow up with them, make sure that they are developing both the theoretical foundations by asking them what they think about the issue and their thoughts on other adjacent issues. And most importantly how those in power would react to the project, which leads us to...

  3. I – Inoculate: Mentally and preparing your comrades for a pushback from those in power is important to not lose their support, much like vaccines prepare the body for when viruses and certain bacteria attack the body. When you get to this point, open the topic by asking them what they think the company you guys are working for would do, for example, if they found out about your unionization efforts? Or what would the local government do if they found out you and many others are planning to delay, or even completely stop a project that could potentially leave an entire community homeless?

    • During your follow up, make sure to ask them if they think the authorities know what your group is up to, and what things could be done to prevent that from happening.
  4. O – Organize: Everyone is sufficiently motivated. Everyone knows what they're doing. Everyone is mentally and emotionally prepared. Now it's time for some collective action!

    • First, discuss your notes about all the grievances that were shared during the Agitate phase and construct a narrative of what is going on and form an analysis using relevant theories much like in the “Concentrate” phase of the Mass Line.

    • Then, split the tasks that need doing, creating posters, talking to prospective members, etc. Form committees if they always need doing. Then follow up with all the tasks, and have them follow up on each other's tasks as well.

  5. U – Unionize: Depending on the particular needs of your organization, you guys might want to register with the relevant local and national government authorities as they do provide some degree of protection for some forms of collective action. Also, this serves as a way to formally introduce your cause to a much wider audience and allow your organization to join much bigger initiatives like the aforementioned IWW.

    • While unionization might not need follow-ups once you're registered, one must certainly make sure that phases A to O are regularly repeated in order to maintain the organization's momentum and cohesion. This is an iterative process as well and must be a continuous process of re-orientation and motivation.

One could see the similarities with Mass Line, especially during Agitation and Organization phases. The main difference is, the AEIOU process includes the community being organized into the organizing process and finding solutions in a much more direct manner than what could be found in the Mass Line

However...

But, what about both?

Especifisimo is a form of social organizing popularized by the FARJ in Brazil that is summarized as:

  • The need for a specifically anarchist organization built around a unity of ideas and praxis.

  • The use of the specifically anarchist organization to theorize and develop strategic political and organizing work.

  • Active involvement in and building of autonomous and popular social movements via social insertion.

A specifically anarchist organization can, for example, use mass line tactics to assist with a certain issue in a community. After the success of the program, it would then be easier to initiate an organizational drive via the AEIOU process and leave a stable Anarchist presence in the area.


Different tactics aside, the time to act is now. The foundations of the neoliberal world order is buckling under the weight of its own corruption, and we must take advantage of any moment of weakness.

Now more than ever is the best time to be a socialist, and we must not waste this opportunity to bolster our ranks and directly participate in the people's struggle to improve their material conditions. All we need are some boots on the ground, some crazy assholes knocking on people's doors and having serious discussions about their lives.

 
Read more...

from theblacksquid's random thoughts

Money is Alive

I. Definitions

Account – A record representing an amount owed by one party to another.

Store – An object or place that contains goods or otherwise has value.

Exchange – An act giving a product or providing a service in return for something else.

II. Maps and the Root of All Evil

“For the love of money is the root of all evil: Which while some coveted after, they have erred from the faith, and pierced themselves through with many sorrows.” – 1st Timothy 6:10

It's likely you've heard this story before: Some big businessman or politician gets engulfed in a scandal involving financial fraud. A foreign investment deal where they got a cut in exchange for favors, maybe they scraped off the top of some government construction project, it doesn't matter. No sooner one would hear the refrain from either someone seeing the news with you, or even the news anchors themselves – “In the end, money in and of itself isn't evil. It's what people do with it that is.” Then someone follows up with a comparison with knives.

Since I was a kid, I've always felt that this was insincere, or felt there was something wrong with this line of reasoning. I was at a loss before, but now I think I found the words to explain what's going on.

But first, we need to talk about maps.

Actual maps are a flat representation of a geographic area measured in two axes, longitude and latitude. However, the lines on the map are arbitrary, imaginary ones, and so do the borders between towns, cities, regions and nations. To disagree with the fiction of nations is folly. But, on the other hand, there are material differences, which in varying levels of accuracy, take the shape of those border lines. Demographics, architecture, shared culture and common histories, as well as the manifestations of the various agendas of those in power. Trade occurs between them, immigration of both the legal and illicit kind happens, leading to an exchange of cultures, violence might even break out, etc. Without borders, it's hard to make sense of where one ends and the other begins. Not to mention how much a colonizing force's presence could be felt in a post-colonial nation, like what could be seen in modern-day Philippines. The reality of the territories being represented by the maps are orders of magnitude greater than what could be processed by the human mind, much less represent on a flat surface, but yet we still use maps. because they are useful.

Philosophers like Timothy Leary and Robert Anton Wilson also wrote about the “reality tunnel”. They spoke of how the human subconscious filters out details that it deems unnecessary. That it filters based on economic class, past experiences, religious beliefs, culture and other things. What we pay attention to are the things that we recognize.

Recognizable shape or form. (Longitude)

Recognizable functions. (Latitude)

What we perceive to be objects, are maps. The limits of their physical shape and functions are the borders we've arbitrarily placed upon them. Deleuze and Guattari have described their metaphysics in this way. That we need maps in order to make sense of the world, otherwise we'd go mad at the vast amount of data pouring through our senses.

III. A Map of Oppression

But now that we've gotten that map stuff out of the way, what's this got to do with money?

Everything.

Back in ancient Greece, Plato postulated that all physical objects are imperfect manifestations of certain, ethereal “Forms”. That money in all it's forms, coins, paper bills, transactions on a database, etc, are imperfect embodiments of some ideal “Money”. Somewhere. You can see how this is a problem. The world is too messy, or what Deleuze would say, “molecular”, to be a manifestation of fundamental forms. That's why you need “maps”.

So how do we map out “Money”, then?

Different things have been used to represent money in the different cultures that used them. Seashells, pretty rocks, shiny pieces of metal, and fancy slips of paper. However in our postmodern omni-digital age, money is becoming more and more electronic. At first it was just banks electronically sending transactions to one another, until it has become a global network of interconnected central banks. Radically new forms of money are also being developed which do not depend on a State-managed financial entity. Whatever form they take, though, they must fulfill these three functions:

It must be useful as a unit of account. One must be able to record debts and set quotas with it. Double-entry accounting, the backbone of the modern banking system, is merely a record of what one owes and what one is owed, after the initial injection of capital.

It must be a store of value. In the past, metals and silks used as currency were valuable because of their of the products you could make with them and their aesthetic beauty. Fiat money, however, derive it's value from the State that prints it. The State does this with three things: First, it forces its citizens to pay its taxes using fiat. Second, it allows for any and all trade done within its borders be paid in fiat. And third, it pays for its servants, most importantly the Police and Military, in fiat.

And lastly, it must be easily used as a medium of exchange. Metallic coins are much easier to transport than the jewelry made with them. Slips of paper are a lot easier to transfer in bulk. Electronic signals, even more so.

As a result of how money works, one could potentially travel long distances with nothing but a sack full of coins and not have to worry about the hassle of carrying anything else, so long as there's people to buy from, of course. One wouldn't need to work their own land, because you can go to the nearby workshop or factory and spend a few hours a day and get paid every two weeks. On paper, that sounds a lot better than waiting for weeks for your next paycheck, right?

Right?

Slovenian philosopher Slavoj Zizek writes that Ideology, being more than just a collection of ideas, is completely subconscious and serves as a series of justifications for supporting authority. It's embodied in a series of rituals, objects and actions that help prop up the status quo.

So what ideas does Money embody?

It allows for the “reification”, or the turning-into-a-thing, of labor power. Hours of one's life are effectively turned into money, allowing it to be stored and used for later.

It allows for the accumulation of other people's labor power. This is why the rich are able to amass the wealth that they do, while the worker is left to survive on their wages. This is not to say that rich people are inherently greedy, no. All that this says is that because the rich owners of business own the property within which the workers perform their work, they are entitled to its profits. This allows them to earn several times (in some cases, several thousand times) more than the regular employee, even if the rich owner were to work at the same, or even greater amount, than his employees. There are only 24 hours in a day, after all.

It allows for the creation of classes between certain types of labor, by pricing their per-hour or per-project value differently.

It allows for the desires and speculation of the moneyed elites to affect the prices of goods and services.

It externalizes motivation in the form of financial incentives, encouraging people to pursue profit over personal development, in many cases even mistaking one for the other.

What then happens as a result of all this is that a minority continues to accumulate wealth, which they then reinvest into more wealth-accumulating ventures, while the people that work under them spend what little they earn in consumable goods. They do not accumulate anything. Not to mention how the uncertainty of market speculation leaves the working class in the dust while the rich essentially gamble away the entire economy.

IV.

So a brief summary of what we've talked about so far, we described how the official narrative is how “money is a tool, and depends on what people use them for”. We then briefly discussed Deleuzian maps and Zizekian ideology and interpreted money in those terms in order to illustrate how money is an embodiment of labor reification and capital accumulation. Using those same terms, we also posited that by using money, we participate in the system that keeps class structures in place.

Especially in the Philippine sense, we can see how neocolonialism is mediated by the financial system. The Philippines has become a source of cheap labor, a market for exported products, services and even cultural products. While we recognize that an interconnected world like that one we have today has real, material imprisonment's on the lives of millions, this has put the weakest of the weak, those on the fringes of society at the mercy of a few rich perverts. Their greed has now driven the world to the brink of destruction, and it may already be too late.

As anarchists, then, we recognize that all forms of money have no place in a world structured around the values of freedom, equity and solidarity. That it is a manifestation of the state's power and must be abolished along with the State itself. But until such a social revolution happens, by either force of arms or a non-violent uprising of the people, we must continue to look for ways to improve the material conditions of the vulnerable and the working class, and be mindful of how our participation in the financialized world we find ourselves in affects the those around us.

 
Read more...

from Byte for your thoughts

In this blog post I'll go over building a prototype of Java application that can load and run Kotlin scripts at runtime. Extra requirement is to support scripts written in various mutually incompatible Kotlin language versions. This experiment is an isolated, self-contained project, but it does explore a real-world use-case that I've encountered.

Use-case

Kotlin has language features that make it well suited for scripting and using DSLs. As such it is a good candidate for writing more involved configuration files. A good example of this is Gradle's Kotlin DSL. The configuration file use-case can be generalized into a plugin system. In this case the base application can be extended at runtime with any number of Kotlin scripts.

Such plug-able application can be paired with an HTTP server. In this case the server can execute a plugin script in response to an HTTP request, and use its output as an HTTP response. At this point the application is begging to resemble a simplified Function as a service system. It can read plugin scripts from a public source (e.g. a git repository) and have users submit their own scripts.

With time, as the service grows in popularity, users submit many different scripts. On the other hand development of Kotlin progresses and there are new language version releases. Script developers, enticed by new language features, start requesting support for newer Kotlin versions.

Unfortunately, some of the code in existing scripts is using experimental Kotlin 1.1 features that have suffered breaking changes in subsequent 1.2 and 1.3 releases. This makes upgrading the Kotlin version in the base application problematic. Migrating to 1.3 would make enthusiastic script developers happy, but would also break some existing scripts. On the other hand, scripts cannot be upgraded to newer Kotlin versions and still run on the existing 1.1 version used by the server application. This chicken and the egg problem causes a stand still and Kotlin version is locked to 1.1.

The solution

In this experiment I've built a simplified plugin engine that can be used to load and execute Kotlin scripts with various language versions. I've skipped fetching scripts form public git repositories, running HTTP server and matching requests to scripts. The solution is lacking in security and performance as well.

What it does achieve is illustrate a solution of the stated use-case in an isolated, self contained project. Complete source code can be found on GitHub.

Running scripts

My first step was to build Java app that can load and run a Kotlin script at runtime. Java itself provides a scripting API (defined by JSR 223) for abstracting the mechanics of running scripts in compatible languages. Form its version 1.1 Kotlin provides an implementation of this Java API.

API documentation suggests registering scripting engine implementations in a special file inside META-INF directory and using dedicated manager to obtain engine instances. However, since I was planning on doing some jar juggling later on, I decided to instantiate Kotlin script engine programmatically and keep all of it in my source code.

At this stage the application was a straightforward maven project with few lines of Java code.

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>io.github.antolius</groupId>
    <artifactId>kotlin-engine-experiment</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <java.version>8</java.version>
        <kotlin.version>1.1.61</kotlin.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-script-util</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-script-runtime</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-compiler-embeddable</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
public class Main {
    public static void main(String[] args) throws Exception {
        String kotlinScript = "\"Using Kotlin version: "
            + "${KotlinVersion.CURRENT}\"";
        ScriptEngine engine = new KotlinJsr223JvmLocalScriptEngineFactory()
            .getScriptEngine();
        Object result = engine.eval(kotlinScript);
        System.out.println(result); // Using Kotlin version: 1.1.60
    }
}

ScriptEngine provides a method for evaluating source code from a java.io.Reader, so executing a script from a file was easy too.

Multi module

Now that the app could load and run Kotlin scripts it was time to support multiple language versions. The maven project described in the previous section declares a compile-time dependency on a specific Kotlin version. Since I needed to support multiple versions I decided to load Kotlin dependencies into separate class loaders at runtime. That way I could work with different versions of Kotlin libraries at the same time.

Next step was to turn the application into a multi module maven project. That way each module could declare a dependency on a distinct Kotlin version. I created 4 modules:

  • Three Kotlin modules, each with a dependency on a different Kotlin version and code for instantiating the Kotlin JSR 223 script engine.
  • Engine module, that contained script loading logic, and didn't have any Kotlin dependency. Instead it loaded the three Kotlin modules' jars in runtime.

Each of the three Kotlin modules included a single class:

package io.github.antolius.engine.kotlin1;
// imports...
 
public class ScriptEngineSupplier implements Supplier<ScriptEngine> {
    @Override
    public ScriptEngine get() {
        return new KotlinJsr223JvmLocalScriptEngineFactory().getScriptEngine();
    }
}

The only difference was the package name. Module with 1.1 Kotlin dependency had package kotlin1, module with 1.2 package kotlin2 etc.

The engine module created a dedicated class loader for each language version and loaded individual Kotlin module jar in runtime. It instantiated the Supplier from that jar:

public class ScriptEngineFactory {
    public ScriptEngine newEngine(
        URL kotlinModuleJar,
        String fullyQuelifiedSupplierClassName
    ) {
        ClassLoader classLoader = newClassLoaderWith(kotlinModuleJar);
        Supplier<ScriptEngine> supplier = instantiateSupplierFrom(
            fullyQuelifiedSupplierClassName,
            classLoader
        );
        return supplier.get();
    }

    private ClassLoader newClassLoaderWith(URL kotlinModuleJar) {
        try {
            return URLClassLoader.newInstance(
                new URL[] {kotlinModuleJar},
                getClass().getClassLoader()
            );
        } catch (Exception e) {
            throw new RuntimeException("Couldn't create class loader", e);
        }
    }

    private Supplier<ScriptEngine> instantiateSupplierFrom(
        String className,
        ClassLoader classLoader
    ) {
        try {
            Class<?> loadedClass = Class
                .forName(className, true, classLoader);
            Class<Supplier<ScriptEngine>> supplierClass = cast(loadedClass);
            Constructor<Supplier<ScriptEngine>> constructor = supplierClass
                .getConstructor();
            return constructor.newInstance();
        } catch (Exception e) {
            throw new RuntimeException("Couldn't load " + className, e);
        }
    }

    @SuppressWarnings("unchecked")
    private Class<Supplier<ScriptEngine>> cast(Class<?> loadedClass) {
        return (Class<Supplier<ScriptEngine>>) loadedClass;
    }
}

This ScriptEngineFactory could be used to obtain an instance of JSR 223 script engine capable of running Kotlin scripts with different versions. The problem was in knowing where to find those Kotlin module jars.

The application technically worked, however it was difficult to build manually. At this point I had to compile each Kotlin module into a fat jar that contains both the Supplier implementation and its Kotlin dependencies. Then I had to somehow provide paths to those fat jars to the engine application at runtime.

Maven tricks

Building jars

First thing that maven could help with was building fat jars for the three Kotlin modules. For this I used maven assembly plugin. Specifically I configured the plugin for Kotlin 1 module with:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>3.1.1</version>
    <configuration>
        <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
        <finalName>kotlin-1-module</finalName>
        <appendAssemblyId>false</appendAssemblyId>
    </configuration>
    <executions>
        <execution>
            <id>assemble-all</id>
            <phase>package</phase>
            <goals>
                <goal>single</goal>
            </goals>
        </execution>
    </executions>
</plugin>

I defined the final jar's name as kotlin-1-moule. This is important, since by default maven would have included the project version in the name and that would have complicated things for me later on. Config for other modules was nearly identical, just with different jar names.

Packaging jars

The next problem was finding those jars from within the engine module's code. I solved this by packaging fat jars as resources of the engine module. For this I used maven resources plugin configured in engine module's pom with:

<plugin>
    <artifactId>maven-resources-plugin</artifactId>
    <version>3.1.0</version>
    <executions>
        <execution>
            <id>copy-resources</id>
            <phase>validate</phase>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <configuration>
                <outputDirectory>
                    ${project.build.outputDirectory}/kotlin-jars
                </outputDirectory>
                <resources>
                    <resource>
                        <directory>
                            ${rootdir}/kotlin-1-module/target
                        </directory>
                        <filtering>false</filtering>
                        <includes>
                            <include>kotlin-1-module.jar</include>
                        </includes>
                    </resource>
                    <resource>
                        <directory>
                            ${rootdir}/kotlin-2-module/target
                        </directory>
                        <filtering>false</filtering>
                        <includes>
                            <include>kotlin-2-module.jar</include>
                        </includes>
                    </resource>
                    <resource>
                        <directory>
                            ${rootdir}/kotlin-3-module/target
                        </directory>
                        <filtering>false</filtering>
                        <includes>
                            <include>kotlin-3-module.jar</include>
                        </includes>
                    </resource>
                </resources>
            </configuration>
        </execution>
    </executions>
</plugin>

where ${rootdir} was defined as:

<properties>
    <rootdir>${project.parent.basedir}</rootdir>
</properties>

For this to work properly I needed maven to build Kotlin modules first. This would generate the fat jars in their individual target directories. Then maven could build the engine module, and include fat jars as resources. Since engine module didn't declare direct dependencies on Kotlin modules, maven built modules in the order they appeared in the parent's pom:

<modules>
    <module>kotlin-1-module</module>
    <module>kotlin-2-module</module>
    <module>kotlin-3-module</module>
    <module>engine</module>
</modules>

Cleanup

With this setup engine module was packaged with all of its runtime dependencies. Since individual jars didn't include project version in their names, the jar resource names were constant. This allowed me to define the jar URL and the fully qualified name of the Supplier implementation in an enum:

public enum Language {

    KOTLIN_1_1(
            "io.github.antolius.engine.kotlin1.ScriptEngineSupplier",
            "/kotlin-jars/kotlin-1-module.jar"
    ),
    KOTLIN_1_2(
            "io.github.antolius.engine.kotlin2.ScriptEngineSupplier",
            "/kotlin-jars/kotlin-2-module.jar"
    ),
    KOTLIN_1_3(
            "io.github.antolius.engine.kotlin3.ScriptEngineSupplier",
            "/kotlin-jars/kotlin-3-module.jar"
    );

    private final String supplierClass;
    private final String resourceName;

    Language(String supplierClass, String resourceName) {
        this.supplierClass = supplierClass;
        this.resourceName = resourceName;
    }

    public String getSupplierClass() {
        return supplierClass;
    }

    public URL getJarURL() {
        return this.getClass().getResource(resourceName);
    }
}

The ScriptEngineFactory#newEngine method could now be simplified into:

public class ScriptEngineFactory {
    public ScriptEngine newEngine(Language version) {
        // rest of the code is more-less the same...
    }
}

Plugin API

At this point maven could build the project automatically, and the ScriptEngineFactory could be used to obtain JSR 223 script engine for any Kotlin version. The last usability problem left was defining an interface between scripts and the engine.

For this purpose I introduced a dedicated API maven module, and added it as a dependency for the rest of the modules. Within it I defined the Plugin interface as:

public interface Plugin {
    @NotNull
    Response process(@NotNull Request req);
}

Request and Response were just POJOs encapsulating all input and output parameters of the process method. All that Kotlin scripts need to do in order to be compatible with the engine is return an instance of a Plugin.

I also wanted to demonstrate how dependencies might be injected into scripts from Java code, so I defined two more interfaces:

public interface Printer {
    void print(@NotNull String line);
}

and

public interface PrinterAware {
    void set(@NotNull Printer printer);
}

Java code should implement the Printer, and scripts interested in using it should implement PrinterAware interface. To pull it all together I created a PluginLoader class in the engine module:

public class PluginLoader {
    private final ScriptEngineFactory factory;
    private final Printer printer;

    public PluginLoader(ScriptEngineFactory factory, Printer printer) {
        this.factory = factory;
        this.printer = printer;
    }

    public Plugin load(File sourceFile, Language kotlinVersion) {
        Reader sourceFileReader = readerFrom(sourceFile);
        ScriptEngine engine = factory.newEngine(kotlinVersion);
        Plugin plugin = runScript(sourceFileReader, engine);
        autowirePrinter(plugin);
        return plugin;
    }

    private Reader readerFrom(File source) {
        try {
            FileInputStream stream = new FileInputStream(source);
            return new InputStreamReader(stream, StandardCharsets.UTF_8);
        } catch (FileNotFoundException e) {
            String message = "Couldn't create a reader for " + source;
            throw new RuntimeException(message, e);
        }
    }

    private Plugin runScript(Reader sourceReader, ScriptEngine engine) {
        try {
            Object result = engine.eval(sourceReader);
            return (Plugin) result;
        } catch (Exception e) {
            String message = "Couldn't evaluate script to a Plugin instance";
            throw new RuntimeException(message, e);
        }
    }

    private void autowirePrinter(Plugin plugin) {
        if (PrinterAware.class.isAssignableFrom(plugin.getClass())) {
            PrinterAware aware = (PrinterAware) plugin;
            aware.set(printer);
        }
    }
}

PluginLoader could be used to load Kotlin scripts from files and provide the rest of the application with implementations of the Plugin interface.

In conclusion

The final Java application uses a few tricks to enable execution of mutually incompatible Kotlin scripts:

  1. Kotlin's implementation of JSR 223 script engine is used to evaluate scripts.
  2. Script engines themselves are loaded into separated class loaders at runtme.
  3. Various maven plugins are used to package all the different Kotlin dependencies as resources at build time.
  4. Simple interfaces define a contract between Kotlin scripts and the rest of the application.

As mentioned before, the complete project can be found on GitHub. In addition to the code discussed in this post, the full project contains a few extra bits:

  • Tests that verify this whole thing actually works.
  • An example main method that can be executed to run a script.
  • A few Kotlin scripts implementing the Plugin interface.
  • Ability to load .kt classes in addition to .kts scripts.
  • Caching and reuse of Kotlin version specific class loaders.

Building this prototype was a fun exercise for me, but now I'd be interested in hearing from you as well. Do you see this kind of dynamic plugin system fitting into some of your projects? Have you encountered similar use-cases before, and if so, how did you solve them? Let me know:

 
Read more...

from veer66

ใน Python ตาม code ข้างล่าง append เป็น method ของ object a แต่พอมานับจำนวนสมาชิกใช้ len(a) ซึ่ง len เป็น built-in function แทน ถ้าอยากให้มีรูปแบบเดียวกันเปลี่ยนจาก len(a) ไปเป็น a.__len__() ก็ได้ แต่ก็จะมี ____ เกินมาอีก ใน Python เองก็คงจะมีหลักเกณฑ์ว่าเมื่อไหร่อะไรจะเป็น function อะไรจะเป็น method ซึ่งก็อาจจะต้องเรียนรู้หรือจำไว้

a = [1, 2, 3, 4, 5]
a.append(10)
print(len(a))

ใน JavaScript ก็มีรูปแบบที่ต่างกันคือ push เป็น method แต่ length เป็น property สังเกตได้จากว่าตอนเรียกไม่มีวงเล็บ ใน JavaScript ก็คงมีหลักการว่าเมื่อไหร่อะไรจะเป็น method หรือเป็น property ซึ่งก็ต้องเรียนรู้หรือจำไว้

a = [1, 2, 3, 4, 5]
a.push(10)
console.log(a.length)

ใน Ruby ทีนี้เหมือนกันแล้วคือ push ก็เป็น method และ length ก็เป็น method

a = [1, 2, 3, 4, 5]
a.push(10)
p(a.length)

แต่ก็ยังมีประเด็นต่อไปอีกว่าทำไมใน Ruby เขียนแบบนี้

10 + 20 + 30 + 40 + 50

ไม่เป็น method และเรียกเหมือนอย่างอื่นบ้างล่ะ

10.+(20).+(30).+(40).+(50)

(Emacs) Lisp จะต่างกับอันอื่นหน่อย ตรงที่ push มันไปต่อหน้าแทนที่จะต่อหลัง

(setq a '(1 2 3 4 5))
(push 10 a)
(print (length a))
(+ 10 20 30 40 50)

เขียน Lisp นี่ทุกอย่างก็จะเรียงเหมือนกันหมดเลย ได้แก่ (push ...) (length ...) (+ ...) ไม่เดี๋ยวต่อหน้า len(...) หรือเดี๋ยวต่อหลังเป็น a.length หรือว่าเดี๋ยวมีหรือไม่มีวงเล็บ เช่น a.length กับ a.length

แต่ปัญหาที่มันจะเจอคือหลายท่านรับไม่ได้ที่วงเล็บไปอยู่ข้างหน้าชื่อ function ถึงกับว่ามันวงเล็บย้ายที่แล้วเขียนไม่ได้เลย

แต่ Julia ก็เขียนแบบนี้ได้ append! ก็เป็น length ก็เป็น function ทั้งคู่ แถมตอนบวกก็เขียนแบบ function ได้ด้วย

a = [1,2,3,4,5]
append!(a,10)
print(length(a))
+(10,20,30,40,50) # จะเขียนแบบ 10 + 20 + 30 + 40 + 50 ก็ได้

แต่ก็อาจจะคิดได้ว่าทำเวลาสร้าง array ไม่เป็น function บ้าง ก็อาจจะเปลี่ยน [1,2,3,4,5] เป็น push!([],1,2,3,4,5) แทน ทีนี้ก็จะเหลือแต่ = แล้วที่ดูไม่เหมือนอย่างอื่น ซึ่งอันนี้ผมก็นึกวิธีแก้ให้มันเหมือนกันไม่ออก

 
Read more...

from Qua info

I've updated the instance to revision 7926eb2 which is release 0.11.1 of writefreely.

The upstream announcement has all the details on the changes.

As we have been following the develop branch, many of the changes were already active on qua.name before this release. We typically merge in changes from upstream as soon as possible after testing.

The 0.11 release has many interesting new features, I won't list them all here, the upstream announcement does an excellent job of describing them.

There is a new experimental admin option available to silence users. So far, I haven't needed that feature.

There are however quite a few users which register on the site and never use it afterwards as well as a couple of obvious articles that just exist to have links to other sites for gambling etcetera. At some point I will publish a policy where it will be made clear how inactive accounts and commercial postings are handled. The silencing makes the users posts invisible for others but does not affect the user otherwise, i.e. log in is still possible.

 
Read more...

from veer66

โพสต์นี้คนอ่านที่เป็นเป้าหมายหลักก็คือผมเอง

อย่างแรกเลยสมมุติว่า ElasticSearch ที่รันอยู่แล้ว

สร้าง dir ที่จะเก็บ snapshot และ chown ให้เป็นของ user เดียวกับที่ daemon ของ elasicsearch รันอยู่

แก้ elasticsearch.yml ที่ path.repo ให้ชี้ไปที่ dir ที่สร้างไว้ในข้อ 1 เช่น [“/bak/b1”] ไรงี้

backup/snapshot

สร้าง repo

curl -X PUT "localhost:9200/_snapshot/my_backup?pretty" -H 'Content-Type: application/json' -d'
{
  "type": "fs",
  "settings": {
    "location": "/bak/b1"
  }
}
'

restore

สร้าง repo

curl -X PUT "localhost:9200/_snapshot/my_backup/snapshot_1?wait_for_completion=true&pretty"

ตอนนี้ก็คือจะเสร็จแล้ว สิ่งที่ผมทำคือ rsync /bak/b1 ไปเครื่องอื่นแล้วลอง restore เพื่อไม่ให้น่าเบื่อเครื่องอื่นที่ว่าก็จะใช้ docker ด้วย

พอ rsync มาแล้ว ก็ chown -R 1000:1000 $(pwd)/bak/b1

สร้าง elasticsearch.yml

cluster.name: "docker-cluster"
network.host: 0.0.0.0
path.repo: ["/usr/share/elasticsearch/bak"]

รัน ElasticSearch ผ่าน Docker

docker run \
       --name=es6 \
       --net=host \
       -e "discovery.type=single-node" \
       -v $(pwd)/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
       -v $(pwd)/bak/b1:/usr/share/elasticsearch/bak \
       docker.elastic.co/elasticsearch/elasticsearch:6.8.4

สร้าง repo

curl -X PUT "localhost:9200/_snapshot/my_backup?pretty" -H 'Content-Type: application/json' -d'
{
  "type": "fs",
  "settings": {
    "location": "/usr/share/elasticsearch/bak"
  }
}
'

สั่ง restore

curl -X PUT "localhost:9200/_snapshot/my_backup?pretty" -H 'Content-Type: application/json' -d'
{
  "type": "fs",
  "settings": {
    "location": "/usr/share/elasticsearch/bak"
  }
}
'

เสร็จแล้ว

คำสั่งต่าง ๆ ก็มาจาก guide ครับ

 
Read more...

from Adriano Maini

Se, un vecchio tema sullo sport...

Ripensando ad un tema (o componimento per un concorso), incentrato sullo sport, dell'anno scolastico 1964/65, quando ero in V^ Ginnasio a Ventimiglia (IM), mi accorgo che con l'ingenuità tipica di tanti ragazzi dell'epoca andavo in quello scritto a perorare la necessità di costruire in Italia numerosi impianti per consentire la diffusione di massa delle attività motorie e concludevo auspicando correttezza e lealtà nelle gare.

In quel periodo, in effetti, nella nostra zona le strutture erano veramente poche, così come nel resto del Paese.

Non sapevo ancora che di lì a poco avrei vissuto una breve stagione nell'atletica, che mi consente ora qualche digressione curiosa. Dato che l'unico campo attrezzato era quello di Imperia, per la corsa (per fare il fiato, almeno) ci si allenava spesso per strada. Essendo la mia società di Sanremo (IM), ci saremmo in quel periodo sognati la pista realizzata da poco dalla città della canzone sin quasi alle porte di Imperia sul tracciato della vecchia ferrovia! E se scaldavo da solo le gambe vicino a casa venivo guardato come un tipo originale: non erano ancora i tempi del footing di massa!

 
Continua...