Skip to content

Instantly share code, notes, and snippets.

View vangog's full-sized avatar

Ivan vangog

  • Smartcat
View GitHub Profile
#Maintained by: RehabMan for: Laptop Patches
#battery_Samsung_NP300E5A-S01ARU.txt
# created by socolovivan - 2018-01-03
# Works for:
# Samsung NP300E5A-S01ARU
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
/*
Change menu background
*/
if ( !$.browser.msie || !$.browser.mozilla ) {
html2canvas(document.body, {
onrendered: function(canvas) {
var str = canvas.toDataURL();
$('body').append('<div id="blur_menu_bg"></div>');
$('#blur_menu_bg').css('background-image', 'url(' + str + ')');
$('.bg').blurjs({
window.requestAnimFrame = (function () {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
window.setTimeout(callback, 1000 / 60);
};
})();
var canvas = document.getElementById('canvas'),
ctx = canvas.getContext('2d'),
cw = window.innerWidth,
ch = window.innerHeight,
nginx -t && service nginx reload
#Install proftpd with synaptic or with this command :
sudo apt-get install proftpd
#Add this line in /etc/shells file (sudo gedit /etc/shells to open the file):
/bin/false
#Create a /home/FTP-shared directory :
cd /home
sudo mkdir FTP-shared
#Replace xxx with your IP Address
bind-address = xxx.xxx.xxx.xxx
Or add a bind-address = 0.0.0.0 if you don't want to specify the IP
Then stop and restart MySQL with the new my.cnf entry. Once running go to the terminal and enter the following command.
lsof -i -P | grep :3306
That should come back something like this with your actual IP in the xxx's
mysqld 1046 mysql 10u IPv4 5203 0t0 TCP xxx.xxx.xxx.xxx:3306 (LISTEN)
### Apache Rewrite
# Request resides in your 'sites/default/files' folder.
RewriteCond %{REQUEST_URI} ^/sites/default/files/(.*)$
# File doesn't exist.
RewriteCond %{REQUEST_FILENAME} !-f
# Directory doesn't exist.
RewriteCond %{REQUEST_FILENAME} !-d
# Redirect request to your development or production server.
RewriteRule ^/sites/default/files/(.*)$
http://dev.example.com/sites/default/files/$1 [L] 
function showInViewport(elem, offset) {
if (document.documentElement.getBoundingClientRect) {
var left = parseInt(elem.css('left'), 10),
top = parseInt(elem.css('top'), 10);
elem.css('visibility', 'hidden').show();
var rect = elem[0].getBoundingClientRect();
if (rect.left < offset)
elem.css('left', offset - rect.left + left);
else if (rect.right > window.innerWidth - offset)
@vangog
vangog / 0_reuse_code.js
Created November 15, 2013 06:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console