Skip to content

Instantly share code, notes, and snippets.

@ixtk
ixtk / osu-api-v2.py
Last active December 10, 2024 10:37
Python code example of OSU! API v2 usage
import requests
from pprint import pprint
from os import getenv
API_URL = 'https://osu.ppy.sh/api/v2'
TOKEN_URL = 'https://osu.ppy.sh/oauth/token'
def get_token():
data = {
'client_id': getenv('CLIENT_ID'),
@ixtk
ixtk / links.txt
Created June 15, 2021 12:31
Links and titles for some Social Empires images

แƒ–แƒแƒ’แƒแƒ“แƒ˜ แƒ›แƒแƒ—แƒฎแƒแƒ•แƒœแƒ”แƒ‘แƒ˜

Design mockup

Figma file

Sass

แƒแƒ› แƒžแƒ แƒแƒ”แƒฅแƒขแƒจแƒ˜ แƒกแƒขแƒ˜แƒšแƒ˜แƒกแƒ—แƒ•แƒ˜แƒก แƒ’แƒแƒ›แƒแƒ•แƒ˜แƒงแƒ”แƒœแƒ”แƒ‘แƒ— SASS extension-แƒก.

แƒกแƒฎแƒ•แƒ

Figma Design

Bluff Grid: Know Me Edition

As a logged-in user

  • I see the homepage:
    • Button to Host a New Game
    • Button to Join a Game
  • Navigation bar with my username and profile picture (as a clickable button) displayed

What is this??

This is about writing clean CSS for group projects.

Since we're gonna work as a team, it's important to have consistent base styles that everyone will use. So our UI will look the same regardless of who wrote the CSS code. There will not be differences between Student A's button and Student B's button. They will share common class names and CSS values.

One student writes all these values based on the design at the start of the project, pushes to Github. Others always use these CSS variables and utitlity classes for their JSX components.

Create VARIABLES for the following:

  • border-radius (in px)

แƒ—แƒ˜แƒ—แƒแƒ”แƒฃแƒšแƒ˜ แƒ’แƒ•แƒ”แƒ แƒ“แƒ˜แƒกแƒ—แƒ•แƒ˜แƒก แƒจแƒ”แƒฅแƒ›แƒ”แƒœแƒ˜แƒ— แƒชแƒแƒšแƒ™แƒ” แƒคแƒแƒšแƒ“แƒ”แƒ แƒ˜ pages-แƒจแƒ˜. แƒ“แƒ แƒ—แƒ˜แƒ—แƒแƒ”แƒฃแƒšแƒ˜แƒกแƒ—แƒ•แƒ˜แƒก แƒจแƒ”แƒฅแƒ›แƒ”แƒœแƒ˜แƒ— แƒชแƒแƒšแƒ™แƒ” CSS & JSX แƒคแƒแƒ˜แƒšแƒ”แƒ‘แƒ˜ (แƒแƒ  แƒ“แƒแƒฌแƒ”แƒ แƒแƒ— แƒ แƒแƒ›แƒ”แƒšแƒ˜แƒ›แƒ” แƒ™แƒแƒœแƒ™แƒ แƒ”แƒขแƒฃแƒšแƒ˜ แƒ’แƒ•แƒ”แƒ แƒ“แƒ˜แƒก แƒ™แƒแƒ“แƒ˜ App.css-แƒจแƒ˜)

src/
โ”œโ”€โ”€ mock-data/
โ”‚   โ”œโ”€โ”€ products.json
โ”‚   โ”œโ”€โ”€ users.json
โ”œโ”€โ”€ shared/
โ”‚   โ”œโ”€โ”€ Header.jsx
โ”‚ โ”œโ”€โ”€ Footer.jsx
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

แƒจแƒ”แƒฅแƒ›แƒ”แƒœแƒ˜แƒ— node.js-แƒ˜แƒก แƒกแƒ™แƒ แƒ˜แƒžแƒขแƒ˜ onlineStatus.js.

แƒ›แƒแƒชแƒ”แƒ›แƒฃแƒšแƒ˜แƒ แƒแƒ‘แƒ˜แƒ”แƒฅแƒขแƒ˜:

const servers = {
  facebook: [{ username: "turbo-booster", isOnline: false }],
  discord: [
    { username: "mailbox_2", isOnline: true },
 { username: "Leanne", isOnline: false }

ul-แƒก แƒ“แƒแƒฃแƒฌแƒ”แƒ แƒ” list-style-position: inside;

site-main-แƒก แƒ–แƒ”แƒ“แƒ›แƒ”แƒขแƒ˜ margin-top แƒแƒฅแƒ•แƒก

แƒคแƒแƒœแƒขแƒ˜ แƒ˜แƒงแƒแƒก sans-serif

line-height: 1.4 body-แƒ–แƒ”

if (SW) {