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 | |
# Данный скрипт управляет возможностями энергосбережения монитора в X.Org | |
# ./dpms enable -- Разрешает отключать монитор для экономии энергии | |
# ./dpms disable -- Запрещает отключать монитор для экономии энергии | |
# Для прочего смотрите xset q, секция DPMS | |
usage="Usage: ./dpms < enable | disable | show | set [standby [suspend [off]]] | reset>" | |
# Reset values |
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 | |
# | |
# Script for managing videostreaming over LAN with logging and GUI notifications. | |
# | |
# Dependencies: tstools libnotify-bin | |
# | |
# 2012, Novikov «Envek» Andrey. Use it freely under the MIT license. | |
# Configuration | |
MULTICASTADDR=224.0.0.1 # Target IP for streaming (from multicast range) |
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
#include <iostream> | |
#include <inttypes.h> | |
#include <math.h> | |
using namespace std; | |
uint64_t maxPrimeMul (uint64_t num); | |
bool isPrime (uint64_t num); | |
int main () { | |
uint64_t num; // = 600851475143; |
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
Demo page, shows interaction between HTML page and embedded SVG. | |
Browsers with SVG support (incomplete list): IE 9+, Opera 8+, Firefox 1.5+, Chrome | |
Due to 'same origin policy' in modern browsers, it's recommended to run web server. For example, run 'python -m SimpleHTTPServer' from this directory and visit http://localhost:8000/ | |
For converting SVG to PNG, I recommend to use "rsvg-convert" command from "librsvg2-bin" package. Run in console something like this: cat map.svg | rsvg-convert > map.png |
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
#!/usr/bin/ruby | |
# encoding: utf-8 | |
# | |
# Script for changing photo creation timestamp (in EXIF metadata and filesystem) | |
# If you're using rvm, please run script as `ruby photo-touch.rb` | |
# Tested in ruby-1.9.3-p125 and ree-1.8.7-2012.02 | |
# | |
# Install ExifTool: http://www.sno.phy.queensu.ca/~phil/exiftool/install.html | |
# | |
# You need next gems for script to work (use gem install gem_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
unless File.exists?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'sqlite3' | |
GEMFILE | |
system 'bundle' | |
end |
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 | |
# Beautiful script, that creates videos from printed html. | |
# Authors: Andrey Novikov, Olga Kosolapova, Timofey Karev | |
# Distributed AS IS under terms of MIT License | |
# | |
# Required packages: | |
# wkhtmltopdf : ~> 0.11.rc1 | |
# imagemagick : | |
# libav || ffmpeg : (with mpeg2video codec) |
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
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.0.1' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# This connection will do for database-independent bug reports. | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |
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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'rack', github: 'rack/rack' | |
gem 'pg' | |
GEMFILE | |
system 'bundle' |
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
--- ext/openssl/ossl.c | |
+++ ext/openssl/ossl.c | |
@@ -1048,6 +1048,7 @@ Init_openssl() | |
*/ | |
/* CRYPTO_malloc_init(); */ | |
/* ENGINE_load_builtin_engines(); */ | |
+ OPENSSL_config(NULL); /* Makes Ruby respect system OpenSSL config */ | |
OpenSSL_add_ssl_algorithms(); | |
OpenSSL_add_all_algorithms(); | |
ERR_load_crypto_strings(); |
OlderNewer