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
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-extract.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-apps.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-fs.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-user-guides.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-store.desktop | |
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2 | |
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false | |
tracker reset --hard |
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/bash | |
Green='\033[0;32m' # Green | |
Yellow='\033[0;33m' # Yellow | |
Reset='\033[m' | |
echo -e "Cleaning ${Yellow}\$TMPDIR${Reset}..." | |
rm -fr $TMPDIR/react* ; | |
echo -e "${Green}Done." | |
echo -e "${Reset}Cleaning ${Yellow}watchman cache${Reset}..."; |
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 | |
global_palette="/tmp/global_palette.png" | |
filters="fps=$5,scale=$6:-1:flags=lanczos" | |
ffmpeg -v error -ss $1 -t $2 -i $3 -vf "$filters,palettegen" -y $global_palette | |
ffmpeg -v error -ss $1 -t $2 -i $3 -i $global_palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $4 | |
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
td { | |
background: red; | |
padding-left: 5px; | |
padding-right: 5px; | |
color: white; | |
font-size: 20px; | |
font-weight: bold; | |
width: 40px; | |
height: 60px; | |
text-align: center; |
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
def get_ascii_name(name): | |
""" returns a non-ascii -turkish- string to ascii one """ | |
name = name.lower() | |
map = {u"ı": "i", | |
u"ğ": "g", | |
u"ç": "c", | |
u"ü": "u", | |
u"ö": "o", | |
u"ş": "s"} | |
uname = [] |
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
(defn handle-register [username email pass1 pass2] | |
(if(has-values?[username email pass1 pass2]) | |
(json {:resp "Please fill all fields."})) | |
(if(not(= pass1 pass2)) | |
(json {:resp "Passwords dont match."})) | |
(if(not(nil?(db/get-user-by-username username))) | |
(json {:username "This username already exists."})) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> | |
<script src="http://documentcloud.github.io/underscore/underscore-min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="cardRates"> |
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
var toObject = function(obj){ | |
var newObj = {}; | |
for(var i = 0; i<obj.length; i++){ | |
for(var k in obj[i]){ | |
if(obj[i].hasOwnProperty(k)) { | |
newObj[k] = obj[i][k]; | |
} | |
} | |
} | |
return newObj; |
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
// Validate Phone Format | |
var filter = /^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/; | |
// Validate Email Format | |
var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,6}|[0-9]{1,3})(\]?)$/; | |
// Validate Date Format (Short Date mm/dd/yyyy) | |
var filter = /^(0?[1-9]|1[012])\/(0?[1-9]|[12][0-9]|3[01])\/(?:19|20|21\d{2})/; |