Skip to content

Instantly share code, notes, and snippets.

Avatar

Ken Takagiwa giwa

View GitHub Profile
@ZackStone
ZackStone / slack-invite-all-members-to-a-channel.js
Created Apr 14, 2017
Invite all team members to a Slack channel
View slack-invite-all-members-to-a-channel.js
/*
https://webapps.stackexchange.com/questions/100820/how-do-i-invite-all-team-members-to-a-new-slack-channel#answer-104062
Instructions: Just browse to the appropriate channel and paste
this script (below) into your Chrome/Firefox dev console and hit enter.
Then wait for the script to run until it completes.
It might take time as there is a limit to how many users may be invited at once.
The script will loop until all team members are invited.
*/
var foundAny=false;
function selectAllByLetter(remainingLetters) {
@satoshin2071
satoshin2071 / new_gist_file.md
Created Jun 13, 2016
TestFlightへのアップロード手順
View new_gist_file.md

TestFlightへのアップロード手順

前提条件

  • iTunes Connectへサインイン可
  • テスト対象アプリとアカウントの紐付けが完了している
  • Distribution用の証明書がキーチェーンのログイン項目に登録されていること
  • Distribution用のプロビジョニングが追加されていること
@joshlk
joshlk / faster_toPandas.py
Last active Jul 31, 2020
PySpark faster toPandas using mapPartitions
View faster_toPandas.py
import pandas as pd
def _map_to_pandas(rdds):
""" Needs to be here due to pickling issues """
return [pd.DataFrame(list(rdds))]
def toPandas(df, n_partitions=None):
"""
Returns the contents of `df` as a local `pandas.DataFrame` in a speedy fashion. The DataFrame is
repartitioned if `n_partitions` is passed.
@indiesquidge
indiesquidge / subdomain-localhost-rails-5.md
Created Jan 19, 2016
how to access subdomains locally with Rails 5
View subdomain-localhost-rails-5.md

Subdomaining Localhost with Rails 5

I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api

Rails.application.routes.draw do
  constraints subdomain: "api" do
    scope module: "api" do
@jonathan-beebe
jonathan-beebe / AppDelegate.swift
Last active Feb 26, 2019
Detect if a Swift iOS app delegate is running unit tests
View AppDelegate.swift
import UIKit
// Detect if the app is running unit tests.
// Note this only detects unit tests, not UI tests.
func isRunningUnitTests() -> Bool {
let env = NSProcessInfo.processInfo().environment
if let injectBundle = env["XCInjectBundle"] {
return NSString(string: injectBundle).pathExtension == "xctest"
}
return false
@montanaflynn
montanaflynn / goxy.go
Last active May 29, 2018
Golang HTTP Proxy
View goxy.go
package main
import (
"log"
"flag"
"net"
"net/http"
"net/http/httputil"
"time"
"strconv"
@asufana
asufana / 開発ルール.md
Last active Apr 2, 2020
開発ルールについて
View 開発ルール.md

開発ルールについて

当部門の開発ルールを文書化する

  • 情報システム部門として社内業務システムを内製している
  • 言語はJava

開発ルールの目的

@reedobrien
reedobrien / proxypass.go
Created May 2, 2015
A basic auth protected proxy server
View proxypass.go
package main
import (
"encoding/base64"
"flag"
"io"
"log"
"net/http"
"strings"
)
View gulpfile.coffee
gulp = require 'gulp'
util = require 'gulp-util'
coffee = require 'gulp-coffee'
sass = require 'gulp-sass'
slim = require 'gulp-slim'
plumber = require 'gulp-plumber'
COFFEE_FILES = './src/coffee/**/*.coffee'
gulp.task 'coffee', ->
@alecxe
alecxe / runner.py
Last active Jan 10, 2020
Self-contained minimum example script to run scrapy
View runner.py
import json
from scrapy.crawler import Crawler
from scrapy.contrib.loader import ItemLoader
from scrapy.contrib.loader.processor import Join, MapCompose, TakeFirst
from scrapy import log, signals, Spider, Item, Field
from scrapy.settings import Settings
from twisted.internet import reactor
You can’t perform that action at this time.