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
import asyncio | |
class Sample(object): | |
def start(self, **kwargs): | |
loop = asyncio.get_event_loop() | |
return loop.run_until_complete(self.create_tasks(loop, **kwargs)) | |
async def create_tasks(self, loop, **kwargs): |
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
""" | |
pip install git+https://github.com/nnsnodnb/python-apns.git@payload#egg=gobiko.apns | |
https://github.com/nnsnodnb/python-apns/tree/payload | |
""" | |
from gobiko.apns.client import APNsClient | |
from gobiko.apns.payload import PayloadAlert, Payload | |
import jwt |
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 python | |
# coding: utf-8 | |
""" | |
This script file automatically inserts the import of the libraries used for 'ResourceKit'. | |
Insert new 'Run Script' before 'Compile Sources' in Build Phases. | |
And fill this code. | |
python $SRCROOT/script/generated_resource.py LIBRARY_1 LIBRARY_2 LIBRARY_3 ... |
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 | |
import gzip | |
import os | |
import re | |
import urllib.request | |
DOWNLOAD_FILE = 'cidr.txt.gz' | |
urllib.request.urlretrieve( |
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
# coding: utf-8 | |
from requests_oauthlib import OAuth1Session, OAuth1 | |
import requests | |
import settings | |
class APIClient(object): |
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
var http = require('http'); | |
var server = http.createServer(); | |
var apns = require('apn'); | |
var options = { | |
cert: './cert.pem', | |
key: './key.pem', | |
gateway: 'gateway.sandbox.push.apple.com', | |
port: 2195, | |
}; |
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
### Django ### | |
*.log | |
*.pot | |
*.pyc | |
__pycache__/ | |
local_settings.py | |
db.sqlite3 | |
media | |
staticfiles/ |
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
from bottle import route, run, HTTPResponse | |
@route('<url:path>') | |
def callback(url): | |
body = 'ただいまアクセスが集中しているため、サイトが繋がりづらい状態になっています。 ご迷惑をおかけして申し訳ありません。' | |
r = HTTPResponse(status=503, body=body) | |
r.set_header('Content-Type', 'document') | |
return r | |
if __name__ == '__main__': |
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 ### | |
# Xcode | |
# | |
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
## Build generated | |
build/ | |
DerivedData/ | |
## Various settings |
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 | |
MERGEPBX_TARGET=mergepbx | |
MERGEPBX_PREFIX=/usr/local/bin | |
MERGEPBX_BUILD_DIR=/tmp | |
MERGEPBX_REPO=https://github.com/simonwagner/mergepbx.git | |
build() | |
{ | |
cd $MERGEPBX_BUILD_DIR/$MERGEPBX_TARGET |