Skip to content

Instantly share code, notes, and snippets.

View rainbow23's full-sized avatar
🏠
Working from home

rainbow23 rainbow23

🏠
Working from home
View GitHub Profile
@rainbow23
rainbow23 / paiza
Created May 28, 2017 16:37
C037:アニメの日時 再チャレンジ採点結果
using System;
public class Hello{
public static void Main(){
// 自分の得意な言語で
// Let's チャレンジ!!
var line = System.Console.ReadLine();
string[] buff = line.Split(' ');
@rainbow23
rainbow23 / hanoi
Last active May 30, 2017 15:42
ハノイの塔
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
void hanoi(int n, int from, int to, int work);
void initialize(int num);
void release();
typedef struct link
{
#include <stdio.h>
#include <string.h>
int main(void){
// 自分の得意な言語で
// Let's チャレンジ!!
char line[1000];
fgets(line, sizeof(line), stdin);
char *pLine;// = NULL;
using System;
using System.Collections.Generic;
public class Hello{
public static void Main(){
// 自分の得意な言語で
// Let's チャレンジ!!
//machine number & sweets
string machineAndSweets = System.Console.ReadLine();
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
void error(char *msg)
{
fprintf(stderr, "%s:%s\n", msg, strerror(errno));
@rainbow23
rainbow23 / ip check c#
Last active May 12, 2017 18:20
paiza mondai
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IppAddrCheck
{
class Program
{
@rainbow23
rainbow23 / jenkins-port-forwarding.md
Created May 7, 2017 16:55 — forked from carlossless/jenkins-port-forwarding.md
Port Forwarding (8080 -> 80) with `pf` on Mavericks/Yosemite

Jenkins Port Forwarding (8080 -> 80) with pf on Mavericks/Yosemite

This guide is a fork from this gist. I've added minor adjustments to customise these rules to forward connections from an outsite interface like en0.

Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

1. Create the anchor file

Create an anchor file under /etc/pf.anchors/com.jenkins with your redirection rule like:

#include <stdio.h>
int main()
{
for(int i =0; i < 4; i++){
printf("num:%d >> %d\n",i, (i>>1)&1);
/* log
00
01
10
@rainbow23
rainbow23 / gist:fe8e9de108ebd312563b
Last active January 25, 2016 11:17
Library追加だけ実装
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class LibrarySettings {
@rainbow23
rainbow23 / Framework追加 .framework追加 対応 完成
Last active January 22, 2016 14:24
hard coding しているが正常な動きは確認、 provisioning の指定ができなかったのでこれから調べる
using UnityEngine;
using System.Collections;
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class AddFrameworkPostProcessBuild : MonoBehaviour {
private static PBXProject m_PBXProject = null;
private static string m_ProjPath = null;