A Pen by Captain Anonymous on CodePen.
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
#!/usr/bin/python | |
import tweepy | |
# ログイン設定 | |
twitter_conf = { | |
'consumer' : { | |
'key' : "consumer_key", | |
'secret' : "consumer_secret" | |
}, |
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
AnalogClock clock; | |
void setup() { | |
size(400, 400); | |
clock = new AnalogClock(width/2, height/2, width/2); | |
clock.setFillColor(color(255)); | |
clock.setStrokeWeight(5); | |
} | |
void draw() { |
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 SecondApplet extends PApplet { | |
PApplet parent; | |
SecondApplet(PApplet _parent) { | |
super(); | |
// set parent | |
this.parent = _parent; | |
// init window | |
PSurface surface = super.initSurface(java.awt.Color.GRAY, -1, false, false); | |
surface.placeWindow(new int[]{0, 0}); |
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
import java.util.Arrays; | |
class EmbedPdeInPdf { | |
PApplet parent; | |
String filename; | |
EmbedPdeInPdf(PApplet _parent) { | |
parent = _parent; | |
} | |
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
console.tweet = function(tweet) { | |
if (typeof tweet !== "object") return; | |
var keys = ["screen_name", "user_id", "tweet_text", "thumbnail_url", "tweet_url"]; | |
var isValid = true; | |
keys.forEach(function(key){ | |
isValid &= tweet.hasOwnProperty(key); | |
}); | |
if (!isValid) return; |
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 | |
DEFAULT_DIR=/opt/gitlab/embedded/service/gitlab-rails/app/assets/images | |
PUBLISH_DIR=/opt/gitlab/embedded/service/gitlab-rails/public/assets | |
cd $DEFAULT_DIR | |
wget -O favicon.ico https://about.gitlab.com/ico/favicon.ico | |
wget -O brand_logo.png https://about.gitlab.com/images/logo.png | |
cp brand_logo.png logo-black.png | |
cp brand_logo.png logo-white.png |
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
@@ -55,7 +55,21 @@ | |
After login, make `client` and `client_in` instance | |
to communicate with LINE server | |
""" | |
- raise Exception("Code is removed because of the request of LINE corporation") | |
+ | |
+ self.transport = THttpClient.THttpClient(self.LINE_HTTP_URL) | |
+ self.transport_in = THttpClient.THttpClient(self.LINE_HTTP_IN_URL) | |
+ | |
+ self.transport.setCustomHeaders(self._headers) |
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
static class console { | |
static void log(Object... objs) { | |
for (Object obj : objs) { | |
System.out.print(obj.toString()); | |
} | |
System.out.println(); | |
} | |
static void debug(Object... objs) { | |
log(objs); | |
} |