Skip to content

Instantly share code, notes, and snippets.

@austinjp
austinjp / Wordpress-inside-LXC.md
Last active September 7, 2023 12:04
An *unprivileged* LXC container dedicated to running Wordpress

What and why

Create an unprivileged Linux container (LXC) dedicated to running Wordpress websites.

If you install Wordpress regularly on Linux you can instead simply clone this container.

The Wordpress installation is nothing fancy. It's not multi-site, it's not SSL enabled by default, or anything like that. Just a plain bog-standard Wordpress installation serving a single domain.

Warning!

package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@justinwoo
justinwoo / using-rxjs-instead-of-flux-with-react.md
Last active October 21, 2023 10:16
Using RxJS instead of Flux with React to organize data flow

Reposted from Qiita

For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.

Why I'm tired of using and teaching flux

There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.

If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:

@fernandezpablo85
fernandezpablo85 / git-maven-howto.md
Last active April 16, 2024 17:02
how to create your own maven repository on github

How to create a maven repository for your github project step by step

Clone your project in a separate folder

(note: replace ORGANIZATION and PROJECT)

git clone git clone git@github.com:ORGANIZATION/PROJECT.git my-repository

Cd into it

@caspahouzer
caspahouzer / gist:a4d0f0093a9110ac8913
Created December 17, 2014 12:44
download file and save to private ios directory
function getFileAndSave (filename, url) {
var file_obj = {
file: filename,
url: url,
path: null
};
var testFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory);
var privateDocFolder = testFile.nativePath.replace('Documents/', '');
privateDocFolder += 'Library/Private%20Documents/';
@etoews
etoews / local.conf
Created June 11, 2014 20:20
local.conf for TXLF 2014
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services
@michaljemala
michaljemala / tls-client.go
Last active April 10, 2024 01:57
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)
<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<id>de.appwerft.cm</id>
<name>CriticalMass</name>
<version>1.0.0</version>
<publisher>rainerschleevoigt</publisher>
<url>http://</url>
<description>not specified</description>
<copyright>2014 by rainerschleevoigt</copyright>
<icon>appicon.png</icon>
@etoews
etoews / local.conf
Created April 18, 2014 20:40
DevStack local.conf for OpenStack Icehouse
[[local|localrc]]
# Credentials
DATABASE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
RABBIT_PASSWORD=devstack
# Services
@mscharley
mscharley / app.js
Last active May 25, 2017 23:33 — forked from radiosilence/gist:4040553
RequireJS with Zurb Foundation 5
/*
This assumes that your bower_components folder is /assets. I renamed it in .bower.json for sanities sake.
I use baseUrl = '/js' as this is where all my custom javascript is and requirejs can't navigate
bower's folder structure anyway.
*/
requirejs.config({
paths: {