Skip to content

Instantly share code, notes, and snippets.

View larvata's full-sized avatar

Larvata larvata

View GitHub Profile

#A brief intro into Stateless functions#

So stateless functions are new in React 0.14 which are quite interesting. They look a bit like this.

const Test = ({name, amount}) => {
 return <div className="test">{name} has £{amount}</div>;
};

ReactDOM.render(<Test name="ben" amount="-2000" />) //  <div className="test">ben has £-200</div> 
@dcondrey
dcondrey / ffmpegchapters-explicit.sh
Created April 20, 2016 08:34
Use ffmpeg to split file by chapters. Python version and bash version
#!/bin/bash
# Author: http://crunchbang.org/forums/viewtopic.php?id=38748#p414992
# m4bronto
# Chapter #0:0: start 0.000000, end 1290.013333
# first _ _ start _ end
while [ $# -gt 0 ]; do
ffmpeg -i "$1" 2> tmp.txt
@tj
tj / update.js
Last active April 29, 2023 14:53
shouldComponentUpdate utility
let rows = {}
export default function(props = [], state = []) {
return function(target) {
const proto = Object.create(target.prototype)
proto.shouldComponentUpdate = function(newProps, newState) {
let id = (this._update_id = this._update_id || Math.random())
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)
@rokugasenpai
rokugasenpai / how_to_download_streaming_jp.md
Last active December 17, 2023 09:50
各ストリーミング配信のダウンロード方法(要curl・ffmpeg・rtmpdump・chrome・limechat・wireshark)

ツイキャス

@NoahDragon
NoahDragon / InstallLinuxKernelAndEnableBBR.sh
Last active April 23, 2019 05:48
Update Ubuntu Linux Kernel to 4.9 Which Includes the BBR Algorithm, It Can Significantly Improve the TCP Connection Performance. (Like ServerSpeeder)
#! /bin/sh
wget http://in4serv.com.br/backup/kernel-4.9-stable && sudo chmod +x ./kernel-4.9-stable && ./kernel-4.9-stable
# After reboot, turn on BBR
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p # Save the changes
sysctl net.ipv4.tcp_available_congestion_control # Check if BBR is turned on
lsmod | grep bbr # Check if BBR is running
@thinkyhead
thinkyhead / 6502.sublime-syntax
Last active January 4, 2023 00:05
6502 Assembly syntax for Sublime Text
%YAML 1.2
---
#
# 6502 Assembly
#
# 6502 is fairly straightforward, but there are many
# variants, not all of which are easy to take together.
#
# - Code lines have only a few fields, separated by whitespace:
# - Hexdump (e.g., "1234 5C 7F ")
@agrcrobles
agrcrobles / android_instructions_29.md
Last active June 2, 2024 05:54 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?

anonymous
anonymous / ip_blacklist.txt
Created January 3, 2018 00:16
IP Blacklist 2018-01-01
This file has been truncated, but you can view the full file.
1.0.172.203
1.0.201.93
1.0.209.111
1.0.220.166
1.1.129.24
1.1.133.37
1.1.157.202
1.1.186.173
1.1.227.39
1.1.248.14

非破壊 TypeSctript

mizchi / TypeScript Meetup 2


About

  • mizchi / 竹馬光太郎
  • フロントエンドと Node.js