This file contains 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
{ | |
"meta": { | |
"supportedMobileVersions": [ | |
"2.0.0", "2.2.0" | |
] | |
}, | |
"content": { | |
"mobileMessage": { | |
"title": "Fique seguro(a)!", | |
"isAnEmergency": true, |
This file contains 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
xsetwacom list | |
pen="Wacom Intuos S 2 Pen stylus" | |
pad="Wacom Intuos S 2 Pad pad" | |
xsetwacom set "$pad" Button 3 'key ctrl z' # undo | |
xsetwacom set "$pen" Button 2 'key p' # paint brush | |
xsetwacom set "$pen" Button 3 'key shift e' # erase tool |
This file contains 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 keyword | |
', '.join(['"%s"' % kw for kw in sorted(keyword.kwlist, key=len, reverse=True)]) |
This file contains 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 React from 'react'; | |
import SimpleWebRTC from 'simplewebrtc'; | |
import './App.css'; | |
export default class App extends React.Component { | |
componentDidMount() { | |
const webrtc = new SimpleWebRTC({ | |
autoRequestMedia: true, | |
localVideoEl: 'local-video', | |
remoteVideosEl: 'remote-videos-container', |
This file contains 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
image: nikolaik/python-nodejs:latest | |
stages: | |
- install | |
- test | |
- deploy | |
prodInstall: | |
stage: install | |
script: |
This file contains 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
echo "Analyzing..." | |
for filename in ./*.js; do | |
total=`git blame $filename | wc -l` | |
echo "$filename" | |
for year in 2014 2015 2016 2017 2018; do | |
yearly=`git blame $filename | grep ".*$year-\d\d-\d\d.*" | wc -l` | |
percent=`expr 100 \* $yearly / $total` | |
tonys_yearly=`git blame $filename | grep ".*Anthony Minessale.*$year-\d\d-\d\d.*" | wc -l` | |
tonys_percent=`expr 100 \* $tonys_yearly / $total` | |
echo " $year: $yearly (yearly $percent% by everyone and $tonys_percent% by Anthony)" |
This file contains 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
function compactObject(data) { | |
if (typeof data !== 'object') { | |
return data; | |
} | |
return Object.keys(data).reduce(function(accumulator, key) { | |
const isObject = typeof data[key] === 'object'; | |
const value = isObject ? compactObject(data[key]) : data[key]; | |
const isEmptyObject = isObject && !Object.keys(value).length; | |
if (value === undefined || isEmptyObject) { |
This file contains 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
export function reorderSdpMediaLines(sdp) { | |
const lineBreaker = '\r\n'; | |
const parsed = sdp.split(lineBreaker).reduce((parser, line) => { | |
const reading = (line.startsWith('m=video') && 'video') | |
|| (line.startsWith('m=audio') && 'audio') | |
|| parser.reading; | |
if (line === '') { | |
return parser; | |
} |
This file contains 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
git branch | grep -v "main" | xargs git branch -D |
This file contains 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
find . -name '*.pyc' -delete |
OlderNewer