for entry in *.png
do
convert $entry -quality 50 $entry
done
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
| // IMachine machine interface | |
| type IMachine interface { | |
| Transition() string | |
| Current() string | |
| } | |
| // Current returns current state | |
| func (m *Machine) Current() string { | |
| if m.current == "" { | |
| return m.Initial |
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 | |
| import ( | |
| "fmt" | |
| "github.com/dipeshdulal/statemachine" | |
| ) | |
| func main(){ | |
| machine := statemachine.Machine{ |
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
| var minimizeNumber = (num) => { | |
| if(!Number.isFinite(num)) return ""; | |
| const minimizeMap = ["K", "M", "G", "T", "P", "E"]; | |
| if(num < 1000) return num.toString(); | |
| const exp = Math.floor(Math.log(num)/ Math.log(1000)); | |
| const minimized = Number((num / Math.pow(1000, exp)).toFixed(2)); | |
| return minimized+minimizeMap[exp-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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "go.uber.org/fx" | |
| ) | |
| // CustomString is custom string type |
Patch from here from ant media developers. Main change is that they are declaring to check for audio session configuration to enable input mode or not.
RTCAudioSessionConfiguration* webRTCConfiguration = [RTCAudioSessionConfiguration webRTCConfiguration];
if (webRTCConfiguration.mode != AVAudioSessionModeMoviePlayback)Issue originated from: react-native-webrtc/react-native-webrtc#263
Using dehydrate and hydrate function we can persist react query cache in localStorage or AsyncStorage in case of react-native.
Basic implementation for persistence can be made by attaching subscribe function to queryCache and upon new data store the data to persistence layer and upon the app start the persisted cache can be rehydrated.
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
| interface AntWebsocketResponse { | |
| command: "publish" | "start" | "takeConfiguration" | "takeCandidate" | "stop" | "play", | |
| streamId: string; | |
| token?: string; | |
| type?: "offer" | "answer"; | |
| sdp?: string; | |
| candidate?: string; | |
| label?: string; | |
| id?: string; | |
| } |