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
(require 'package) | |
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") | |
("melpa" . "https://melpa.org/packages/"))) | |
(package-initialize) | |
;; set theme | |
(setq inhibit-startup-message t) | |
;(when (fboundp 'menu-bar-mode) (menu-bar-mode -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
328 ffmpeg -y -ss 1 -t 7 -i xxx.webm -vf fps=10,scale=480:-1:flags=lanczos,palettegen patette.png | |
329 ffmpeg -ss 1 -t 7 -i xxx.webm -i patette.png -filter_complex "fps=10,scale=480:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif |
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
"Boot with standard options" "root=UUID=<your uuid of root partition> rw quiet acpi_rev_override=1 initrd=/boot/initramfs-linux.img initrd=/boot/intel-ucode.img enable_psr=1 disable_power_well=0 nvme_core.default_ps_max_latency_us=130000" | |
"Boot to single-user mode" "root=UUID=<your uuid of root partition> rw quiet acpi_rev_override=1 single" | |
"Boot with minimal options" "ro root=/dev/<your root partition name>" |
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
update_config=1 | |
ap_scan=2 | |
ctrl_interface=/var/run/wpa_supplicant | |
network={ | |
mode=0 | |
scan_ssid=1 | |
proto=WPA2 | |
key_mgmt=WPA-PSK | |
pairwise=CCMP |
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
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel | |
yum groupinstall "Development tools" | |
cd /tmp | |
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz | |
tar xf Python-3.5.1.tar.xz | |
cd Python-3.5.1 | |
./configure && make && make install |
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" | |
"net" | |
"net/mail" | |
"net/smtp" | |
"crypto/tls" | |
) |
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
if [ "$(basename $0)" = "install-odoo.sh" ]; then | |
echo "don't run install-odoo.sh, because it's not fully automated script. Copy, paste and execute commands from this file manually" | |
exit 0 | |
fi | |
#### Detect type of system manager | |
export SYSTEM='' | |
pidof systemd && export SYSTEM='systemd' |
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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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
def index_to_int(index): | |
s = 0 | |
pow = 1 | |
for letter in index[::-1]: | |
d = int(letter,36) - 9 | |
s += pow * d | |
pow *= 26 | |
# excel starts column numeration from 1 | |
return s |
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
# -*- Encoding: utf-8 -*- | |
import base64 | |
import binascii | |
import cgi | |
import hashlib | |
import hmac | |
import logging | |
import time | |
import urllib | |
import urlparse |
NewerOlder