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
var lastSheet = document.styleSheets[document.styleSheets.length - 1]; | |
if(lastSheet){ | |
lastSheet.insertRule("@-webkit-keyframes blink { from { opacity: 1.0; } to { opacity: 0.6; } }", lastSheet.cssRules.length); | |
} | |
var blink = {webkitAnimationName: 'blink', | |
webkitAnimationDuration: '1s', | |
webkitAnimationIterationCount: 'infinite', | |
webkitAnimationTimingFunction: 'ease-in-out'}; | |
$("#node").css(blink); |
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
require 'backup' | |
namespace :backup do | |
desc "Backup database." | |
task :db => ['db:load_config'] do | |
config = ActiveRecord::Base.configurations[Rails.env] | |
Backup::Model.new(:rake, 'backup') do | |
store_with Backup::Storage::Local do |local| | |
local.keep = 5 | |
local.path = Rails.root.join('backups') | |
end |
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
options = @options.dup | |
options['skip_bundle'] = true | |
@options = options | |
gsub_file 'Gemfile', 'jquery-rails', 'bower-rails' | |
file 'Bowerfile', <<-CODE | |
asset 'jquery' | |
asset 'jquery-ujs' | |
asset 'bootstrap', '>= 3.0.0' | |
CODE |
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 | |
INTERVAL=5 | |
REBOOT_BORDER=10 | |
MAILTO="[email protected]" | |
LOG_DIR="/var/log/loadavg" | |
mkdir -p $LOG_DIR | |
while : | |
do | |
LOAD_AVG=$( uptime | awk '{print $10}' | cut -d "." -f 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
jQuery ($) -> | |
new Vue( | |
el: '#app', | |
data: | |
msg: 'Hello Vue.js!' | |
) |
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
class QuestsCleanupJob < ActiveJob::Base | |
queue_as :default | |
def perform(*args) | |
# Do something later | |
end | |
end |
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
TARGET = serializer | |
CXX = clang++ | |
CC = clang | |
LDLIB_DIR = -I../../../zeron/cocos2d/cocos \ | |
-I../../../zeron/cocos2d/cocos/2d \ | |
-I../../../zeron/cocos2d/cocos/editor-support \ | |
-I../../../zeron/cocos2d/external/glfw3/include/mac \ | |
-I../../../zeron/cocos2d/extensions \ | |
-I../../../zeron/cocos2d/external \ |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.12.2' | |
} | |
} | |
apply plugin: 'android' |
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
private void clearPurchases() { | |
mHelper = new IabHelper(getContext(), "GOOGLE_TOKEN"); | |
mHelper.enableDebugLogging(true); | |
Log.v(TAG, "mHelper.startSetup"); | |
mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { | |
public void onIabSetupFinished(IabResult result) { | |
if (!result.isSuccess()) { | |
// 失敗した時の処理 | |
} | |
List additionalSkuList = new ArrayList(); |
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
test=> SELECT sid, lid, COUNT(id) FROM attend GROUP BY sid, lid HAVING COUNT(id) > 1; | |
sid | lid | count | |
-----+---------+------- | |
336 | ACB0030 | 2 | |
325 | ABF0030 | 2 | |
(2 rows) | |
test=> SELECT id FROM attend WHERE sid = 336 AND lid = 'ACB0030'; | |
id | |
------- |