This file contains hidden or 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
| class SafariApnController < ApplicationController | |
| # When a user allows permission to receive push notifications, a POST request is sent to the following URL: | |
| # webServiceURL/version/pushPackages/websitePushID | |
| # post '/:version/pushPackages/:website_push_id' => 'safari_apn#package' | |
| def package | |
| #return the push package | |
| send_file(File.join(Rails.root, 'public', 'pushPackage.zip'), type: 'application/zip', disposition: 'inline') | |
| end |
This file contains hidden or 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
| extern mod sync; | |
| // str op trait | |
| use std::str::StrSlice; | |
| // for tcp listen | |
| use std::io::{TcpListener, TcpStream}; | |
| use std::io::net::ip::SocketAddr; | |
| // for trait | |
| use std::io::{Listener, Writer, Acceptor, Buffer}; | |
| // for spawn |
This file contains hidden or 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 | |
| if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
| exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
| -- another way of waiting until an app is running | |
| on waitUntilRunning(appname, delaytime) | |
| repeat until my appIsRunning(appname) | |
| tell application "Messages" to close window 1 | |
| delay delaytime | |
| end repeat |
This file contains hidden or 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/bash | |
| # Migrate ISPConfig 3 installation from one server to another | |
| # This script should run on the final/destination ISPConfig 3 server | |
| # You must first install the same ISPConfig on the destination server | |
| # and make sure to create all the users from the previous installation | |
| # (ISPConfig creates users for each client and web page) | |
| # Tested on ISPConfig version 3.0.5.3 | |
| # Created by Jorge Barnaby (@jbarnaby) - March 2014 | |
| # EDIT YOUR PREVIOUS ISPCONFIG SERVER HERE |
This file contains hidden or 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
| license: gpl-3.0 |
This file contains hidden or 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
| <? | |
| require("redis.php"); | |
| require("json.php"); | |
| $term = $_GET['term']; | |
| $r = new Redis("127.0.0.1","6379"); | |
| $r->connect(); | |
| $items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10")); |
This file contains hidden or 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/bash | |
| # | |
| # The MIT License (MIT) | |
| # | |
| # Copyright (c) 2014 Mathias Leppich <[email protected]> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or 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 | |
| # So you've installed XCode 6 Beta | |
| # Now we could use Swift toolchain to build a minimal | |
| # command line Hellow World | |
| # let's set new Developer Toolchain bundled with Xcode6-Beta.app | |
| # as default toolchain | |
| # sudo xcode-select -s /Applications/Xcode6-Beta.app/Contents/Developer | |
| # alias for Swift binary |
This file contains hidden or 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
| /*************************************************************************************************** | |
| * Copyright (c) 2014 Rüdiger Herrmann | |
| * All rights reserved. This program and the accompanying materials are made available under the | |
| * terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at | |
| * http://www.eclipse.org/legal/epl-v10.html | |
| * | |
| * Contributors: | |
| * Rüdiger Herrmann - initial API and implementation | |
| **************************************************************************************************/ | |
| package com.codeaffine.jgit; |
This file contains hidden or 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
| Originally written by Jeff Bonwick (http://www.mail-archive.com/[email protected]/msg15748.html), and updated by James Lee to work with modern ZFS libs (https://www.mail-archive.com/[email protected]/msg47316.html), I was able to compile this life-saving utility in Ubuntu 14.04 and have verified that it works. (I'm using ZFSonLinux.) | |
| Download the ZFSonLinux tarball and replace the cmd/zhack/zhack.c file with "labelfix.c". Note that zhack is just a simple utility that we're replacing so that we don't have to setup the build environment. (It's hard, so we'll reuse the good work of the ZFSonLinux people.) | |
| Run "./configure; make" and if all goes well then the zfs tools will be built, except for zhack, which we replaced. Run that with the device path to recover your data. | |
| If you want to be super-careful and not tamper with your disk, you can clone it and run the utility on your clone. Or, create an overlay as described in this page: https://raid.wiki.kernel.org/index.php/Recovering_a_failed_ |