Skip to content

Instantly share code, notes, and snippets.

@mdonkers
mdonkers / server.py
Last active April 22, 2024 21:31
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@kgriffs
kgriffs / sysctl.conf
Last active April 6, 2024 19:40
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
#
# See also: https://gist.github.com/kgriffs/4027835
#
# Assumes a beefy machine with lots of network bandwidth
@terranware
terranware / snsToSlack.js
Last active March 7, 2024 14:47
AWS Lambda function to Slack Channel hookup
var https = require('https');
var util = require('util');
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
var postData = {
"channel": "#aws-sns",
"username": "AWS SNS via Lamda :: DevQa Cloud",
@ediblecode
ediblecode / package-json-build-number.ps1
Created August 23, 2017 07:22
Powershell script to parse a package.json version and use as the build number in TeamCity
$version = (Get-Content package.json) -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version"
$buildCounter = "%build.counter%"
$buildNumber = "$version.$buildCounter"
Write-Host "##teamcity[buildNumber '$buildNumber']"
@cmoulton
cmoulton / URLSession Calls in Swift 3.0.1
Last active November 4, 2022 00:29
URLSession Calls in Swift 3.0.1
func makeGetCall() {
// Set up the URL request
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1"
guard let url = URL(string: todoEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = URLRequest(url: url)
// set up the session
# Taken from https://forums.aws.amazon.com/thread.jspa?messageID=332091
sudo su -
cd /usr/local/bin
mkdir ffmpeg
cd ffmpeg
wget http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz
tar -xzf ffmpeg.static.64bit.latest.tar.gz

アイデア

  • 悪いように見えて、実は良いアイデアですか
  • 賛成する人の殆どいない、自分だけが知っている大切な真実を前提としたアイデアですか
  • 自分しか知らない秘密を使ったアイデアですか
  • 週末に頭の良い人たちがやっているようなアイデアですか
  • 「私はどんな問題を解決するべきなのか」を考える代わりに、「誰かが解決してくれるなら、どんな問題を片付けてほしい?」と考えてみましたか
  • 誰も築いていない、価値ある企業とはどんな企業でしょおうか

検証

トラクション

スタートアップが顧客をつかむ 19 のチャネル

バイラルマーケティング

  1. ユーザーが製品に触れる
  2. そのユーザーがその製品を潜在ユーザーに紹介する
  3. 潜在ユーザーがその製品に触れて、ユーザーになる

純粋な口コミ

@jamescmartinez
jamescmartinez / slack_delete.rb
Last active January 4, 2021 21:28
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@chrisvogt
chrisvogt / cakephp-appfog-database.php
Last active June 18, 2018 05:06
Example showing how to connect CakePHP database config to AppFog's VCAP_SERVICES environment array.
<?php
class DATABASE_CONFIG {
public $default = array();
function __construct() {
## --- APPFOG --- ##
// Read in the VCAP_SERVICES environment variable, parse the json, and
// check to see if it exists. If it does, use the settings for our default