Skip to content

Instantly share code, notes, and snippets.

@Teraflopst
Teraflopst / tabbed-content-js.html
Last active August 11, 2016 18:51
Lab: Tabbed Content with JavaScript (v0.1)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>select cards</title>
<style>
#container .active{ background: yellow; border: 0; }
#container div {
display: none;
width: 200px;
@Teraflopst
Teraflopst / calendar.html
Last active August 11, 2016 18:51
Lab: a simple calendar
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>a simple calendar</title>
<style>
body,div,ul,li,h2,p{ margin:0; padding:0; }
#tab { width: 240px; margin: 30px auto; background: #F5F2DD; }
ul { list-style: none; padding: 20px 0px 10px 20px; }
li { float: left; width: 56px; height: 56px; border: 2px solid #565353;background: #565353; margin: 0 10px 10px 0; text-align: center; color: #fff; font-size: .8em; font-family: Arial; }
@Teraflopst
Teraflopst / micro-clearfix-hack.css
Last active February 19, 2016 14:37
Snippet: CSS clearfix
.cf:before,
.cf:after { content: ""; display: table; }
.cf:after { clear: both; }
.cf { *zoom: 1; }
@Teraflopst
Teraflopst / tangram.html
Last active August 11, 2016 18:52
Lab: Make a tangram by Canvas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>七巧板</title>
</head>
<body>
<div style="width: 400px; height: 400px; margin: 0 auto;">
<canvas id="canvas"></canvas>
</div>
@Teraflopst
Teraflopst / pinboard-style.css
Last active August 11, 2016 18:53
Stylish Extension style for Pinboard. Inspired by Flat Pinboard of Dan Klammer and Pushpin App.
/* Theme Name: Flat Pinboard */
/* Theme URL: http://onestark.github.io/ */
/* Version: v0.1 */
/* Created by: He Wenwei */
/* Broswer: Chrome + Stylish Extension */
html {
height: 100%;
}
/* Hide: Timer, Logo Text and Username, How-To Link, & Tab spacer */
@Teraflopst
Teraflopst / box-shadow.html
Last active August 11, 2016 19:05 — forked from ocean90/box-shadow.html
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
border: 1px solid #ccc;
@Teraflopst
Teraflopst / get_selected_files_dirs_path.scpt
Last active June 13, 2020 02:59
AppleScript:获取选中文件(夹)的目录路径
-- 脚本介绍
-- 功能:获取所选文件、文件夹的目录路径,支持多选
-- 如果仅仅想获取文件的目录路径,可以调用 isDirectory() 过滤掉文件夹的路径
tell application "Finder" to set selectedItems to selection as alias list
-- 没选择的话直接退出脚本
if selectedItems is {} then return
-- 获得所选文件/文件夹的父目录。
set parentPath to do shell script "dirname " & quoted form of POSIX path of (item 1 of selectedItems)
-- 用于拼接多个路径
@Teraflopst
Teraflopst / css-layout-02.html
Last active August 11, 2016 20:06
CSS 布局方案
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS布局</title>
<style type="text/css">
.container {
width: 400px;
height: 600px;
position: absolute;

Sync Settings for Atom

Synchronize Atom settings, keymaps, user styles, init script, snippets and installed packages.

Sync Settings by using sync-settings

Default Sync:

  • init.coffee
  • keymap.cson
  • snippets.cson
  • styles.less
  • settings.json (For config.cson)
@Teraflopst
Teraflopst / hide-all-app.scpt
Last active August 23, 2023 22:05
AppleScript: Hide all applications and show the desktop on Mac
tell application "Finder"
set visible of every process whose visible is true and name is not "Finder" to false
set the collapsed of windows to true
end tell