Skip to content

Instantly share code, notes, and snippets.

diff --git app/controllers/api/feed_controller.rb app/controllers/api/feed_controller.rb
index f6e3b3e..092eb60 100644
--- app/controllers/api/feed_controller.rb
+++ app/controllers/api/feed_controller.rb
@@ -48,7 +48,7 @@ class Api::FeedController < ApplicationController
rate: 0,
public: @member.default_public,
}
- if params[:folder_id]
+ if params[:folder_id] and params[:folder_id].to_i != 0
diff --git app/controllers/api/feed_controller.rb app/controllers/api/feed_controller.rb
index f6e3b3e..092eb60 100644
--- app/controllers/api/feed_controller.rb
+++ app/controllers/api/feed_controller.rb
@@ -48,7 +48,7 @@ class Api::FeedController < ApplicationController
rate: 0,
public: @member.default_public,
}
- if params[:folder_id]
+ if params[:folder_id] and params[:folder_id].to_i != 0
@ssig33
ssig33 / aitter.js
Last active August 29, 2015 14:07 — forked from moroya/aitter.js
(function(){
var total = {};
var year = '2012';
var all = false;
function init(num) {
if(typeof num !== 'number') {
num = 0;
$('<div/>').css({
position: 'fixed',
left: 0,
@ssig33
ssig33 / facebook_most_recent.user.js
Last active August 29, 2015 14:06
Facebook で News Feed を強制的に Most Recent にする画期的な user.js
// ==UserScript==
// @name Facebook Force Most Recent
// @namespace http://use.i.E.your.homepage/
// @version 2.0
// @description enter something useful
// @match https://www.facebook.com/*
// @copyright 2012+, You
// ==/UserScript==
var f = function(){
setTimeout(function(){
## coffee -csb
page = require('webpage').create()
fs = require('fs')
page.viewportSize = {width:1280,height:1024}
page.settings.userAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
console.log "DRIVERS START YOUR ENGINE!!"
signin = ->
console.log 'SIGN IN PAGE LOADED'
@ssig33
ssig33 / fuck.rb
Created July 11, 2014 07:30
content-type をリダイレクト考慮して取得
def head_and_track_redirect(uri, limit = 10)
raise if limit == 0
h = Net::HTTP.new(uri.host, uri.port)
if uri.scheme == 'https'
h.use_ssl = true
h.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
h.start{|http|
path = uri.path
path += "?#{uri.query}" unless uri.query.blank?
#!/usr/bin/ruby
require 'rss'
require 'open-uri'
require 'uri'
# 日本人っぽいのだけ欲しい場合'
URL = 'http://xpathfeed.com/feed?url=http%3A%2F%2Fjp.xvideos.com%2F&xpath_list=%2F%2F*%5B%40class%3D%22thumbBlock%22%5D%2Fdiv%2Fp%5B1%5D%2Fa'
RSS::Parser.parse(open(URL).read).channel.items.each{|x|
uri = URI.parse x.link
#coding:utf-8
require 'fileutils'
require 'time'
require 'kconv'
AFTER_ENCODE = 'hogehoge' # エンコード後になんか実行するコマンド
SOURCE = "C:/TS" # TS とかあるところ
TARGET ="C:/MP4"
IGNORE = /BS世界の|BBC|CNN/ #音声の都合とかで HandBrake で処理したくないやつ
@ssig33
ssig33 / daniel_tumblr.user.js
Created June 18, 2014 06:23
ダニエル・ラドクリフ・オン・タンブラー.js
// ==UserScript==
// @name Recommended Daniels
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match http://www.tumblr.com/*
// @copyright 2012+, You
// @require http://code.jquery.com/jquery-1.11.1.min.js
// ==/UserScript==
var f;
f = function() {
return setTimeout(function() {
var href;
if ($('a.ProfileHeading-toggleLink').get(0)) {
href = $('a.ProfileHeading-toggleLink').attr('href');
if (location.href !== href && href.match(/with_replies/)) {
location.href = href;
return true;
}