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
<?php | |
if(imdbi_check('actors')){ | |
echo imdbi('actors'); | |
} | |
else{ | |
echo get_post_meta($post->ID, 'my_field_actors', true); | |
} | |
?> |
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
<?php | |
// چاپ رقم مربوط به بودجه | |
echo imdbi('budget'); | |
// ساختن یک تگ تصویر و نمایش پوستر | |
$poster = imdbi('poster'); | |
$html = '<img src='.$poster.' alt='.the_title().'>'; | |
echo $html; | |
?> |
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
<?php | |
if(imdbi_check('rank')){ | |
echo "این فیلم دارای رتبه".imdbi('rank')."می باشد." | |
} | |
?> |
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
#!/bin/bash | |
#you may need to install uchardet package first. sudo apt install uchardet | |
# https://github.com/BYVoid/uchardet | |
#replace underscore with white-space !important (iconv cannot find files with white-space in their name) | |
find -name "* *.srt" -type f | rename 's/ /_/g' | |
for sub in *.srt; | |
do | |
encode="$(uchardet "${sub}")" |
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
#!/bin/bash | |
if [ "`lsb_release -is`" == "Ubuntu" ] || [ "`lsb_release -is`" == "Debian" ] | |
then | |
sudo apt-get -y install mysql-server mysql-client mysql-workbench libmysqld-dev; | |
sudo apt-get -y install apache2 php5 libapache2-mod-php5 php5-mcrypt phpmyadmin; | |
sudo chmod 777 -R /var/www/; | |
sudo printf "<?php\nphpinfo();\n?>" > /var/www/html/info.php; | |
sudo service apache2 restart; | |
else |
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
# When Ctrl+C is pressed, this script will add the current value of | |
# clipboard into a stack (deque) and when Shift+Alt+V is pressed | |
# it will pop the leftmost value and paste it on the screen | |
# until stack is empty | |
import gi | |
gi.require_version('Gtk', '3.0') | |
gi.require_version('Gdk', '3.0') | |
from keybinder.keybinder_gtk import KeybinderGtk #https://github.com/LiuLang/python3-keybinder | |
from pykeyboard import PyKeyboard #https://github.com/PyUserInput/PyUserInput |
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
using System; | |
using System.Text; | |
using System.Collections.Specialized; | |
using System.IO; | |
using Ude; | |
public static void ConvertFileEncoding(String sourcePath, String destPath, Encoding sourceEncoding, Encoding destEncoding) | |
{ |
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
using System.Collections.Generic; | |
using Gma.System.MouseKeyHook; // for simulating OnDragDrop https://github.com/gmamaladze/globalmousekeyhook | |
using System.Windows.Forms; | |
using CefSharp; | |
public partial class MainForm : Form | |
{ | |
private IList<string> dropFiles; | |
private ChromiumWebBrowser Browser; |
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
#!/bin/bash | |
sudo -s | |
apt update -y | |
#Install apache2 | |
apt install apache2 -y | |
#Suppress Syntax Warnings |
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
module.exports = function scandir (dir, cb) { | |
const fs = require('fs') | |
const path = require('path') | |
let result = [] | |
fs.readdir(dir, (err, filesList) => { | |
if (err) return cb(err) | |
let pending = filesList.length | |
if (!pending) return cb(null, result) |
OlderNewer