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.awt.Component; | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.ArrayList; | |
import javax.swing.*; | |
public class Board extends JPanel implements ActionListener, Runnable { | |
Dude p; |
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/env python | |
import pyglet | |
mp3 = "test.mp3" | |
source = pyglet.media.load(mp3) | |
player = pyglet.media.Player() | |
player.queue(source) | |
player.play() |
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.awt.*; | |
import javax.swing.ImageIcon; | |
public class Enemy { | |
Image img; | |
int x, y; | |
boolean isAlive = true; |
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.awt.*; | |
import java.awt.event.KeyEvent; | |
import java.util.ArrayList; | |
import javax.swing.ImageIcon; | |
public class Dude { | |
int x, dx, y,nx,nx2,left, dy; | |
Image still,jump,reverse; |
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.awt.*; | |
import javax.swing.ImageIcon; | |
public class Bullet { | |
int x,y; | |
Image img; | |
boolean visible; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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.awt.BasicStroke; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.FontMetrics; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.RenderingHints; | |
import java.awt.Stroke; | |
import java.util.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
@Singleton | |
public class DbHelper extends SQLiteOpenHelper { | |
//USER TABLE | |
public static final String USER_TABLE_NAME = "users"; | |
public static final String USER_COLUMN_USER_ID = "id"; | |
public static final String USER_COLUMN_USER_NAME = "usr_name"; | |
public static final String USER_COLUMN_USER_ADDRESS = "usr_add"; | |
public static final String USER_COLUMN_USER_CREATED_AT = "created_at"; | |
public static final String USER_COLUMN_USER_UPDATED_AT = "updated_at"; |
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
## 安裝語系檔 | |
`$ sudo locale-gen "en_US.UTF-8"` | |
## 重新設定語系檔 | |
`$ sudo dpkg-reconfigure locales` | |
## 設定檔 |
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
<?php | |
//edit with your data | |
$repo_dir = '~/repository.git'; | |
$web_root_dir = '~/project'; | |
$post_script = '~/project/scripts/post_deploy.sh'; | |
$onbranch = 'master'; | |
// A simple php script for deploy using bitbucket webhook | |
// Remember to use the correct user:group permisions and ssh keys for apache user!! | |
// Dirs used here must exists on server and have owner permisions to www-data |
OlderNewer