This file contains hidden or 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
| # Set variables in .bashrc file | |
| # don't forget to change your path correctly! | |
| export GOPATH=$HOME/golang | |
| export GOROOT=/usr/local/opt/go/libexec | |
| export PATH=$PATH:$GOPATH/bin | |
| export PATH=$PATH:$GOROOT/bin |
This file contains hidden or 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
| package main | |
| // More info on Getwd() | |
| // https://golang.org/src/os/getwd.go | |
| // | |
| import( | |
| "os" | |
| "fmt" | |
| "log" | |
| ) |
This file contains hidden or 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
| set ie=wscript.createobject("internetexplorer.application","event_") '创建ie对象' | |
| ie.menubar=0 '取消菜单栏' | |
| ie.addressbar=0 '取消地址栏' | |
| ie.toolbar=0 '取消工具栏' | |
| ie.statusbar=0 '取消状态栏' | |
| ie.width=400 '宽400' | |
| ie.height=400 '高400' | |
| ie.resizable=0 '不允许用户改变窗口大小' | |
| ie.navigate "about:blank" '打开空白页面' | |
| ie.left=fix((ie.document.parentwindow.screen.availwidth-ie.width)/2) '水平居中' |
This file contains hidden or 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
| const electron = require('electron') | |
| const { app } = electron | |
| const { BrowserWindow } = electron | |
| const path = require('path') | |
| const url = require('url') | |
| let mainWindow | |
| let loadingScreen |
This file contains hidden or 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 * as execa from 'execa' | |
| type Desktop = | |
| 'kde' | | |
| 'gnome' | | |
| // http://deepin.org | |
| 'dde' | | |
| // https://elementary.io/ | |
| 'pantheon' | | |
| 'win' | |
This file contains hidden or 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 bash | |
| # Created @ 13.01.2015 by Christian Mayer <http://fox21.at> | |
| brew install dbus | |
| cp /usr/local/Cellar/d-bus/1.8.8/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents | |
| # Load DBus | |
| launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist |
This file contains hidden or 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 os | |
| import kivy | |
| from kivy.app import App | |
| from kivy.uix.label import Label | |
| from kivy.uix.gridlayout import GridLayout | |
| from kivy.uix.textinput import TextInput | |
| # to use buttons: | |
| from kivy.uix.button import Button | |
| kivy.require("1.10.1") |
This file contains hidden or 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
| const App = ()=> { | |
| render() { | |
| return ( | |
| <div style={{ | |
| width: '50vh', | |
| overflow: 'scroll' | |
| }}> | |
| <div style={{ height: `120vh` }}></div> | |
| </div> | |
| ) |
This file contains hidden or 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
| // source: https://github.com/segmentio/is-url/blob/master/index.js | |
| export const isUrl = (str: string): boolean => { | |
| let protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/ | |
| let localhostDomainRE = /^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/ | |
| let nonLocalhostDomainRE = /^[^\s\.]+\.\S{2,}$/ | |
| if (typeof str !== 'string') return false | |
| let match = str.match(protocolAndDomainRE) | |
| if (!match) return false | |
| let everythingAfterProtocol = match[1] | |
| if (!everythingAfterProtocol) return false |
This file contains hidden or 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
| <template> | |
| <view class="tabs"> | |
| <scroll-view ref="tabbar1" id="tab-bar" class="tab-bar" :scroll="false" :scroll-x="true" :show-scrollbar="false" | |
| :scroll-into-view="scrollInto"> | |
| <view style="flex-direction: column;"> | |
| <view style="flex-direction: row;"> | |
| <view class="uni-tab-item" v-for="(tab,index) in tabList" :key="tab.id" :id="tab.id" :ref="'tabitem'+index" | |
| :data-id="index" :data-current="index" @click="ontabtap"> | |
| <text class="uni-tab-item-title" :class="tabIndex==index ? 'uni-tab-item-title-active' : ''">{{tab.name}}</text> | |
| </view> |