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
| import android.content.res.Resources; | |
| import android.graphics.drawable.Drawable; | |
| import android.text.Spannable; | |
| import android.text.SpannableStringBuilder; | |
| import android.text.style.ImageSpan; | |
| import android.view.View; | |
| import android.widget.ImageView; | |
| import android.widget.LinearLayout; | |
| import android.widget.SearchView; | |
| import android.widget.TextView; |
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
| import json | |
| import os | |
| from optparse import OptionParser | |
| import requests | |
| import sys | |
| import logging as log | |
| __author__ = 'ravi' | |
| API_URL = 'https://github.com/api/v3/repos/{}/{}/releases' |
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
| from slacker import Slacker | |
| import json | |
| import argparse | |
| import os | |
| # This script finds all channels, private channels and direct messages | |
| # that your user participates in, downloads the complete history for | |
| # those converations and writes each conversation out to seperate json files. | |
| # | |
| # This user centric history gathering is nice because the official slack data exporter | |
| # only exports public channels. |
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
| # Self routing cluster example | |
| vcl 4.0; | |
| import directors; | |
| backend node1 { | |
| .host = "node1.example.com"; | |
| .port = "80"; | |
| } |
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
| var AWS = require('aws-sdk'); | |
| var cloudwatch = new AWS.CloudWatch({ region: 'us-east-1'}); | |
| exports.handler = function (event, context) { | |
| var ElasticSearchHost = 'elasticsearch.example:9200'; | |
| var Environment = 'int'; | |
| var EndTime = new Date; | |
| var StartTime = new Date(EndTime - 15*60*1000); | |
| var Metrics = { |
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
| SELECT * FROM ( SELECT | |
| ce.sku, | |
| ea.attribute_id, | |
| ea.attribute_code, | |
| CASE ea.backend_type | |
| WHEN 'varchar' THEN ce_varchar.value | |
| WHEN 'int' THEN ce_int.value | |
| WHEN 'text' THEN ce_text.value | |
| WHEN 'decimal' THEN ce_decimal.value | |
| WHEN 'datetime' THEN ce_datetime.value |
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
| 1) Generate a private key and certificate signing request: | |
| openssl genrsa -out ios_distribution.key 2048 | |
| openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/emailAddress=me@example.com, CN=Example, C=US' | |
| 2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create | |
| - choose Production -> App Store and Ad Hoc | |
| 3) Download the resulting ios_distribution.cer, and convert it to .pem format: |
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
| <? | |
| ///////////////////// | |
| // slack2html | |
| // by @levelsio | |
| ///////////////////// | |
| // | |
| ///////////////////// | |
| // WHAT DOES THIS DO? | |
| ///////////////////// | |
| // |
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
| REGION=eu-west-1 | |
| VER=1.7.3 | |
| RUNTIME=python3.7 | |
| docker run -v $(pwd):/out -it lambci/lambda:build-$RUNTIME \ | |
| pip install scrapy==$VER -t /out/build/scrapy/python | |
| cd build/scrapy | |
| zip -r ../../scrapy.zip python/ | |
| cd ../.. |
OlderNewer