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
Set-ExecutionPolicy RemoteSigned -Scope Process | |
Set-Location C:\Windows\System32 | |
Start-Process -FilePath bash -ArgumentList "-c `"sudo /usr/sbin/sshd -D`"" -WindowStyle hidden |
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
#include <stdio.h> | |
#include <string.h> | |
#define BUGGY | |
#define PRICE_BENZ 6000000 | |
#define PRICE_CIGARETTE 42 | |
#define SEQ_1 "「一日何本くらい煙草をお吸いに?」: " | |
#define SEQ_2 "「%d本ですね」\n" |
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/bash | |
if test x`uname -s` != x'Darwin'; then | |
exit 0 | |
fi | |
if test `which reattach-to-user-namespace > /dev/null; echo $?` -ne 0; then | |
echo 'Error: reattach-to-user-namespace does not found.' | |
if test `which brew > /dev/null; echo $?` -eq 0; then | |
echo 'Info: Install reattach-to-user-namespace with homebrew.' |
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
% iex --sname foo --cookie elixir-example | |
Erlang R16B02 (erts-5.10.3) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] | |
Interactive Elixir (0.11.2) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(foo@mba11-keith)1> |
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 -*- | |
require 'prime' | |
arr = [] | |
n = Prime.first ** nil.to_i | |
foo = Proc.new {|x| x.times do n = Prime.first(n).last end } | |
bar = Proc.new {|x| arr << [[x] * x] } | |
Prime.first.times do |i| bar.call(Prime.first ** i) end | |
arr.flatten.map {|x| foo.call(x)} | |
puts n |
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 -*- | |
require 'spec_helper' | |
require 'prime' | |
arr = [] | |
n = Prime.first ** nil.to_i | |
foo = Proc.new {|x| x.times do n = Prime.first(n).last end } | |
bar = Proc.new {|x| arr << [[x] * x] } | |
Prime.first.times do |i| bar.call(Prime.first ** i) end | |
arr.flatten.map {|x| foo.call(x)} |
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 | |
# | |
# Init script skeleton for Python-based service control scripts | |
# | |
# chkconfig: 123456 1 99 | |
# description: My service | |
# | |
# Author: Josh Johnson <lionface dot lemonface at gmail dot com> | |
# | |
# |
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 bash | |
# dropbox service | |
DROPBOX_USERS="" # space-separated usernames | |
DAEMON=.dropbox-dist/dropbox | |
NICE=19 # -20 - 19 | |
IONICE_CLASS=3 # 0 - 3 | |
IONICE_PRIOR=7 # 0 - 7 | |
KERNEL=`uname -s` |
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 bash | |
# chkconfig: 345 85 1 | |
# description: Startup script for dropbox daemon | |
# | |
# processname: dropboxd | |
# pidfile: /var/run/dropbox.pid | |
# config: /etc/sysconfig/dropbox | |
# | |
### BEGIN INIT INFO |
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/bash | |
# | |
### BEGIN INIT INFO | |
# Provides: cloud-client-ui | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Should-Start: $network $time | |
# Should-Stop: $network $time | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
NewerOlder