Skip to content

Instantly share code, notes, and snippets.

View waltcow's full-sized avatar
🎯
Focusing

waltcow waltcow

🎯
Focusing
  • China, Guangzhou
View GitHub Profile
@waltcow
waltcow / gist:64369a16bfb3b611e29b8ac16e0d7bcf
Created November 7, 2018 06:43
youtube-dl audio download only
youtube-dl -x --audio-format mp3 --audio-quality 0 --embed-thumbnail --add-metadata https://www.youtube.com/watch?v=
import UIKit
import SnapKit
class ViewController: UIViewController {
lazy var scrollView: UIScrollView = {
let view = UIScrollView()
view.translatesAutoresizingMaskIntoConstraints = false
view.backgroundColor = UIColor.brown
return view
@waltcow
waltcow / gist:1ef3c29707ee48548a30add1994dc1ed
Created December 18, 2016 03:07
封装HTML5的localstorage
const Store = {
get: function(key) {
var value = localStorage.getItem(key);
if (value) {
try {
var value_json = JSON.parse(value);
if (typeof value_json === 'object') {
return value_json;
} else if (typeof value_json === 'number') {
return value_json;
@waltcow
waltcow / index.js
Created August 7, 2016 13:29
Example with react-native-gifted-listview and redux implementation
import React, {Component, PropTypes} from "react";
import {View, ListView, Text, NetInfo, TouchableHighlight, Image} from "react-native";
import Icon from 'react-native-vector-icons/Ionicons'
import GiftedListView from 'react-native-gifted-listview'
import GiftedSpinner from 'react-native-gifted-spinner'
import Animatable from 'react-native-animatable'
import Swipeout from 'react-native-swipeout'