Skip to content

Instantly share code, notes, and snippets.

View mdaisuke's full-sized avatar
:octocat:
vibe coder

mdaisuke mdaisuke

:octocat:
vibe coder
View GitHub Profile
package com.eatify.Eatify.api;
public class EatifyApiClient extends VolleyApiClient {
private static volatile EatifyApiClient instance;
public static EatifyApiClient shared() {
if (instance == null) {
synchronized (EatifyApiClient.class) {
if (instance == null) {
**/*.xcodeproj/*
!**/*.xcodeproj/project.pbxproj
**/*.xcworkspace/*
!**/*.xcworkspace/contents.xcworkspacedata
.DS_Store
**/Pods/*
require 'net/http'
require 'uri'
require 'digest/sha1'
class IMKayacCom
API_KEY = 'api_key'
USERNAME = "username"
# -*- coding: utf-8 -*-
ARGV.each do |fn|
lines = File.readlines(fn)
hiki = lines.map { |l|
l.sub(/^(#+)\s/){ '!'*($1.length) + ' ' }.
sub(/^(-+)\s/){ '*'*($1.length) + ' ' }.
gsub(/\!\[([^\]]+)\]\(([^\)]+)\)/){ $2[0..3] == 'http' ? $2 : ('http://goos-lokka.heroku.com' + $2) }. # picture
gsub(/\[([^\]]+)\]\(([^\)]+)\)/, '[[\1|\2]]'). # url
gsub(/\*\*([^*]*)\*\*/, "'''\\1'''").
sub(/^ /, ' ').
package com.sudosaints.android;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
@mdaisuke
mdaisuke / 00.md
Created December 12, 2013 00:45 — forked from Shinpeim/00.md

Better Java としての Scala

Hello World

  • src/main/scala/Main.scala
object Main {
  def main(args: Array[String]): Unit = {
    println("hello scala!")
#include <stdio.h>
struct {
unsigned bool: 1;
} obj;
int main()
{
int i;
<!doctype html>
<head>
<script src="./enchant.js-builds-0.7.0/build/enchant.js"></script>
</head>
<body style="margin:0; padding:0;"> <script> enchant(); var game = new Core(320, 320);
game.preload('./enchant.js-builds-0.7.0/images/chara1.png');
game.fps = 20;
game.onload = function(){
var bear = new Sprite(32,32);
@mdaisuke
mdaisuke / foo.rb
Created May 3, 2013 16:53
unit test
class Foo
def foo
"foo"
end
def bar
"foo"
end
end
@mdaisuke
mdaisuke / scheme.rb
Created April 27, 2013 11:51
writing scheme
def _eval(exp, env)
if not list?(exp)
if immediate_val?(exp)
exp
else
lookup_var(exp, env)
end
else
if special_form?(exp)
eval_special_form(exp, env)