####Go to temp dir
$ cd /tmp
####Download your version of btsync i386
or x64
$ curl http://btsync.s3-website-us-east-1.amazonaws.com/btsync_i386.tar.gz -o btsync.tar.gz
# i386
$ curl http://btsync.s3-website-us-east-1.amazonaws.com/btsync_x64.tar.gz -o btsync.tar.gz
# x64
####Then unpack this shit
$ tar -xf btsync.tar.gz
####And move to your local bin
$ sudo mv btsync /usr/local/bin/
####Okey, generate sample config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# Matt's DNS management tool | |
# Manage DNS using DDNS features | |
# | |
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/ | |
# | |
# Usage: dnsupdate -s server -k key add foo.example.com 300 a 1.2.3.4 | |
# -h HELP! | |
# -s the server | |
# -k the key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Written on 2013-02-04 by Philipp Klaus <philipp.l.klaus →AT→ web.de>. | |
Check <https://gist.github.com/4707775> for newer versions. | |
A script to update the A and AAAA RRs of HOSTNAME on a DNS server | |
according to your actual ones using nsupdate / TSIG. | |
This script is ready to run on Mac OS X (10.8) but you should be able |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# btsync service | |
# Replace with linux users you want to run BTSync clients for | |
BTSYNC_USERS="btsync" | |
DAEMON=/usr/bin/btsync | |
start() { | |
for btsuser in $BTSYNC_USERS; do | |
HOMEDIR=`getent passwd $btsuser | cut -d: -f6` | |
config=$HOMEDIR/config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.util.concurrent.TimeUnit; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
import org.springframework.integration.core.MessageHandler; | |
import org.springframework.integration.core.PollableChannel; | |
import org.springframework.integration.core.SubscribableChannel; | |
import org.springframework.integration.endpoint.PollingConsumer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSecurity | |
public class SecurityConfig extends WebSecurityConfigurerAdapter { | |
/* other code left out for brevity */ | |
/** | |
* Configure HttpSecurity, adds a CsrfTokenGeneratorFilter after CsrfFilter. | |
* | |
* @param http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppInitializer implements WebApplicationInitializer { | |
@Override | |
public void onStartup(javax.servlet.ServletContext servletContext) throws ServletException { | |
AnnotationConfigWebApplicationContext appContext = new AnnotationConfigWebApplicationContext(); | |
appContext.register(AppConfig.class); | |
servletContext.addListener(new ContextLoaderListener(appContext)); | |
AnnotationConfigWebApplicationContext webConfig = new AnnotationConfigWebApplicationContext(); | |
webConfig.register(WebConfig.class); | |
ServletRegistration.Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(webConfig)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global webapp, Backbone, JST, _*/ | |
webapp.Views = webapp.Views || {}; | |
(function () { | |
'use strict'; | |
webapp.Views.LoginView = Backbone.View.extend({ | |
template: JST['app/scripts/templates/login.ejs'], |
OlderNewer