contnet
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
<?php | |
/* | |
Plugin Name: DWF Popular Posts Widget | |
Description: Displays posts in last X days, sorted by most comments (proxy for popularity) | |
*/ | |
/** Add our function to the widgets_init hook. **/ | |
add_action( 'widgets_init', 'dwf_popular_load_widgets' ); | |
function dwf_popular_load_widgets() { | |
register_widget('DWF_Popular_Widget'); |
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
declare @tableName varchar(200) | |
declare @columnName varchar(200) | |
declare @nullable varchar(50) | |
declare @datatype varchar(50) | |
declare @maxlen int | |
declare @sType varchar(50) | |
declare @sProperty varchar(200) | |
DECLARE table_cursor CURSOR FOR |
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
alert(); |
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
// ... | |
const { writeFile } = require("fs"); | |
const { join } = require("path"); | |
module.exports = { | |
// ... | |
activate() { | |
atom.config.observe("packagename.SettingName", updateStylesheet); | |
return this.subscriptions = new CompositeDisposable(); | |
} |
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
#!/bin/sh | |
# https://trac.ffmpeg.org/wiki/Capture/Desktop | |
FILENAME=${1:-"screencast"} | |
FPS=${2:-"30"} | |
WIDTH=${3:-"1366"} | |
HEIGHT="768" | |
DIMENSIONS="${WIDTH}x${HEIGHT}" | |
MP4="$FILENAME.mp4" |
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
FILENAME=${1:-"screencast"} | |
FPS=${2:-"30"} | |
WIDTH=${3:-"1366"} | |
PALETTE="/tmp/palette.png" | |
FILTERS="fps=$FPS,scale=$WIDTH:-1:flags=lanczos" | |
ffmpeg -v warning -i $FILENAME -vf "$FILTERS,palettegen" -y $PALETTE | |
ffmpeg -v warning -i $FILENAME -i $PALETTE -lavfi "$FILTERS [x]; [x][1:v] paletteuse" -y $FILENAME.gif |
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
#!/bin/sh | |
FILENAME=${1:-"screencast.mp4"} | |
FPS=${2:-"30"} | |
DIMENSIONS=${3:-"1366x768"} | |
printf "\n\033[0;35mRecording to $FILENAME, $FPS fps, $DIMENSIONS...\033[0m\n\n" | |
ffmpeg -v error -framerate $FPS -video_size $DIMENSIONS -f x11grab -i :0.0+0,0 -vcodec libx264 -crf 0 -preset ultrafast -acodec pcm_s16le $FILENAME |
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
app.get("/", (req, res) => { | |
res.sendFile("index.html"); | |
}); | |
app.get("/u/:username", (req, res) => { | |
res.redirect("/#/u/" + req.params.username); | |
}); | |
app.get("/userlist", (req, res) => { | |
res.redirect("/#userlist"); | |
}); |