Skip to content

Instantly share code, notes, and snippets.

View pokutuna's full-sized avatar
๐Ÿ‘๏ธ
๐Ÿ‘„๐Ÿ‘๐Ÿ‘‚

pokutuna pokutuna

๐Ÿ‘๏ธ
๐Ÿ‘„๐Ÿ‘๐Ÿ‘‚
View GitHub Profile
@yukioc
yukioc / macrounit.c
Created November 16, 2009 14:04
C unit testing framework
#ifndef __macrounit_h__
#define __macrounit_h__
#define mu_prn_failed(file,line,expr) printf( "%s:%u: failed assertion `%s'\n",file,line,expr)
#define mu_prn_test(test,passed) printf( " Test: %s ... %s\n",test,(passed)?"passed":"FAILED")
#define mu_prn_suite(suite) printf( "Suite: %s\n",suite)
#define mu_assert(file,line,expr) do { ++mu_asserts; if (!(expr)) { ++mu_failures; mu_prn_failed(file,line,#expr); }} while (0)
#define MU_ASSERT(expr) mu_assert(__FILE__,__LINE__,expr)
#define mu_run_test(test) do { int f=mu_failures; ++mu_tests; test(); mu_prn_test(#test,(f==mu_failures)); } while (0)
@hitode909
hitode909 / zizo.el
Created December 19, 2010 09:23
zizo.el
(defun _zizo (begin end format)
(let (
(str (buffer-substring-no-properties begin end))
(rules '((" " "+") ("|" "%7C") ("\n" "|") ("?" "%3F") ("&" "%26")))
(rule nil))
(while rules
(setq rule (car rules))
(setq rules (cdr rules))
(let (
(a (car rule))
// 2 space ใฎๅ ดๅˆ
// cond_c ใฎๅ‰ใฎindent, ใ“ใ‚“ใชๆ„Ÿใ˜ใง่ชฟ็ฏ€ใงใใ‚‹!!
if ((cond_a || cond_b ||
cond_c || cond_d) || cond_e) {
}
// ๅผ•ๆ•ฐใฎๅ ดๅˆใจใ‹ใงใ‚‚
test(value1, value2,
value3, value4);
@rummelonp
rummelonp / oauth.yml
Created March 29, 2011 03:58
Userstreamใ‹ใ‚‰ใตใใผใ‚‰ใ‚Œใจใ‹ใ‚’็›ฃ่ฆ–ใจใ‹ใ—ใฆGrowlใจใ‹ใ™ใ‚‹ใ‹ใ‚‚ใ—ใ‚Œใชใ„Rubyใ‚นใ‚ฏใƒชใƒ—ใƒˆ
---
:consumer_key: consumer_key
:consumer_secret: consumer_secret
:oauth_token: oauth_token
:oauth_token_secret: oauth_token_secret
@tily
tily / erokimos.rb
Created August 8, 2011 13:31
ใชใ‚“ใงใ‚‚ๆ€ง็š„ใซใ™ใ‚‹ใ‚„ใค
NOUN_PREFIX = %w|ใ“ใ‚“ใ‚‚ใ‚Šใ—ใŸ ๆฅใ˜ใ‚‰ใ†ใ‚ˆใ†ใช ใŸใ‚ใ‚ใซๅฎŸใ‚‹ ็†Ÿใ‚ŒใŸ
็ˆ›ใ‚ŒใŸ ๆฟกใ‚ŒใŸ ้ป’ๅ…‰ใ‚Šใ™ใ‚‹ ใณใฃใ—ใ‚Šใจๅฏ†็”Ÿใ—ใŸ ใ‚‚ใ‚Šใ‚ใŒใฃใŸ
็”˜็พŽใช ใณใ—ใ‚‡ๆฟกใ‚Œใฎ ใใ—ใ‚‡ๆฟกใ‚Œใฎ ใ‚€ใฃใกใ‚Šใจใ—ใŸ ใ‚€ใฃใกใ‚Šใ—ใŸ ๆŸ”ใ‚‰ใ‹ใช
็ช่ตทใ—ใŸ ็››ใ‚ŠไธŠใŒใฃใŸ ๅ—šๅ’ฝใซใ‚‚ไผผใŸ ใƒ”ใƒณใ‚ฏ่‰ฒใฎ ่–„็ดซ่‰ฒใฎ
ไธ€็ณธ็บใ‚ใฌ ๅ…‰ๆฒขใฎใ‚ใ‚‹ ็†ฑใฎใ“ใ‚‚ใฃใŸ ใƒŒใƒกใƒŒใƒกใจใ—ใŸ ใƒŒใƒซใƒŒใƒซใจใ—ใŸ
|
VERB_PREFIX = %w|ใ“ใ‚“ใ‚‚ใ‚Šใจ ๆฅใ˜ใ‚‰ใ„ใชใŒใ‚‰ ๆฅใ˜ใ‚‰ใ†ใ‚ˆใ†ใซ ใŸใ‚ใ‚ใซๅฎŸใ‚‰ใ›ใฆ
ใใฃใ—ใ‚‡ใ‚Šใจ ใณใฃใ—ใ‚‡ใ‚Šใจ ใŸใ‚ใ‚ใซ ๅพฎใ‹ใซ ๅคง่ƒ†ใซใ‚‚ ใ‚‚ใ˜ใ‚‚ใ˜ใจ
|
#!/usr/bin/env ruby
#coding:utf-8
require 'mechanize'
alice = Mechanize.new
page = alice.get ARGV[0]
url = CGI.unescape page.root.xpath('//*[@id="flash-player-embed"]')[0]['flashvars'].split('&flv_url=').last.split('&').first
title = page.root.xpath('//td/strong')[0].inner_text.gsub(/\//, '๏ผ')+'.flv'
@lyricallogical
lyricallogical / gist:2470715
Created April 23, 2012 12:49
play2.0 ใฎ anorm ใฎๅ•้กŒ็‚นใ‚’ใพใจใ‚ใฆใฟใ‚‹ใ€‚้–“้•ใ„ใŒใ‚ใฃใŸใ‚‰ใ‚ณใƒกใƒณใƒˆใ—ใฆใ‚‚ใ‚‰ใˆใ‚‹ใจๅŠฉใ‹ใ‚Šใพใ™ใ€‚ๅ•้กŒใŒใชใ‘ใ‚Œใฐๆœฌๅฎถใซๅฏพใ—ใฆใพใจใพใฃใŸๅฝขใงๅ ฑๅ‘Šใ™ใ‚‹ใคใ‚‚ใ‚Šใงใ™ใ€‚ๆœ€็ต‚็š„ใช็›ฎๆจ™ใฏ anorm ใฎๆ”นๅ–„ใงใ™ใ€‚

play2.0 ใฎ anorm ใฎๅ•้กŒ็‚นใพใจใ‚

ๅฎŸ่ฃ…ใฎ่ฉณ็ดฐใŒๅ…ฌ้–‹ใ•ใ‚Œใฆใ„ใ‚‹

Useful ็ญ‰ใฎๅ…ฌ้–‹ใ™ในใใงใชใ„ใ‚‚ใฎใŒๅ…ฌ้–‹ใ•ใ‚Œใฆใ„ใ‚‹ใ€‚ ๅž‹ใŒๆ›ธใ‹ใ‚Œใฆใ„ใชใ„ public ใชใƒกใƒณใƒใ‚‚ๅคšใใ€API ใซๅฏพใ™ใ‚‹ๆ„่ญ˜ใŒไฝŽใ„ใ€‚

ไธ่ฆใชใ‚‚ใฎใŒๅ…ฌ้–‹ใ•ใ‚Œใฆใ„ใ‚‹

Pk, Id, NoAssigned ็ญ‰ใฏ Magic ใฎใŸใ‚ใซๅฐŽๅ…ฅใ•ใ‚ŒใŸๅž‹ใ ใŒใ€

@paulmillr
paulmillr / active.md
Last active May 7, 2025 14:35
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
package DBIx::Lite::ResultSet::Role::Slave;
use strict;
use warnings;
use Role::Tiny;
around $_ => sub {
my ($ORIG, $self, @args) = @_;
local $self->{dbix_lite} = $self->{dbix_lite}->master;
return $self->$ORIG(@args);
} for qw(