Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <fstream>
/*!
@param[in] path path of a file
@return byte size of a file (return -1 when file cannnot open)
*/
int filesize(char const * path)
{
std::ifstream fin(path, std::ios::in | std::ios::ate);
@steve-jansen
steve-jansen / README.md
Last active May 21, 2024 04:59
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@dnozay
dnozay / _Jenkins+Script+Console.md
Last active May 3, 2024 09:33
jenkins groovy scripts collection.
@yannhowe
yannhowe / .gitlab.ci.yml
Created September 26, 2016 18:06
.gitlab.ci.yml for SSH with private key.
# Image neeeds to have ssh-client
image: docker:git
services:
- docker:dind
stages:
- staging
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
@melpon
melpon / wandbox-sponsors.md
Last active March 2, 2022 05:31
Wandboxのスポンサー募集(締め切りました)

スポンサーの募集は締め切りました。以後は GitHub Sponsors に移行する予定です。

どのような募集をしていたか知りたい場合は履歴を確認してください。

@lkraider
lkraider / crittercism-export.sh
Created June 13, 2017 01:36
Shell script to export Apteligent / Crittercism crash data using their REST API
#!/bin/sh
# set -x
# Requires:
# JSON.sh (https://github.com/dominictarr/JSON.sh)
TOKEN=''
AUTH="Authorization: Bearer $TOKEN"
BASE='https://developers.crittercism.com/v2'
#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@jasonk
jasonk / Jenkinsfile
Last active November 22, 2022 03:23
Docker credential helper for authenticating from environment variables
pipeline {
environment {
DOCKER_REGISTRY = 'https://my-docker-registry.example.com'
DOCKER_CREDS = credentials( 'my-docker-credentials' )
}
}
@voluntas
voluntas / death_march.md
Last active December 29, 2023 15:36
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。