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 | |
host='127.0.0.1' | |
user='user' | |
passwd='passwd' | |
local_folder='/home/projects/example/public_html/application/views/layout/heavymetal' | |
remote_folder='/public_html/application/views/layout/heavymetal' | |
file='heavymetal_eu.php' |
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
# script-eri aldatu "_" "/" euren path-a jakitzeko | |
# gero github-etik proeiktue bajatu | |
cd /usr/src | |
git clone https://github.com/porjo/mt7601.git | |
# baimenak emon | |
chmod 755 /etc/init.d/ralink | |
chmod 755 /usr/local/sbin/ralink |
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
<?php | |
// get API KEY: https://core.telegram.org/bots#botfather | |
// get chad id: http://stackoverflow.com/questions/31078710/how-to-obtain-telegram-chat-id-for-a-specific-user | |
$api_key = 'FAKE1234'; | |
$chat_id = '7850602' | |
$url = "https://api.telegram.org/bot".$api_key."/"; | |
// UNCOMMENT desired method |
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
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
from sys import exit, argv | |
from os import walk, path, system, popen, path | |
from glob import glob | |
import re | |
# allowed extensions | |
ext_allow = ['mp4', 'avi', 'webm', 'ogv', 'ogg', 'mkv', 'flv', 'vob', 'mov', 'wmv', 'm4v', 'mpg', '3gp'] |
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
// array guztiari funtzio bera aplikatzeko erabiliko dugu | |
var zenbakiak = [1, 2, 3]; | |
// funtzioak parametro moduan array-aren balorea hartzen du (i) | |
var erantzuna = zenbakiak.map(function(i) | |
{ | |
return i+1; | |
}); | |
console.log(erantzuna); | |
// [ 2, 3, 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
#!/bin/bash | |
host='127.0.0.1' | |
user='user' | |
pass='passwd' | |
local_folder='/home/projects/example/public_html/application/views/layout/home' | |
remote_folder='/public_html/application/views/layout/home' | |
file='home_eu.php' |
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
<?php | |
// HM10 Bluetooth arduino modules response example | |
$text = "OK+DISISOK+DISC:4C000215:74278BDAB64445208FOC720EAF059935:FFEOFFE1C5:78A5048CECAC:-0620K+DISC:4C000215:74278BDAB64445208F0C720EAf059935:FFFE0FFE1C5:78A50485AF2D:-0580K+DISCE"; | |
//preg_match_all("/\+DISC\:([A-Z0-9]+\:[A-Z0-9]+\:[A-Z0-9]+\:[A-Z0-9]+)\:([A-Z0-9\-]+)/", $text, $m); | |
preg_match_all("/\+DISC\:(\w+\:\w+\:\w+\:\w+)\:([\w\-]+)/", $text, $m); | |
print_r($m); | |
// output |
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
# /resources/js/example.js/123456/ -> /resources/js/example.js | |
# /resources/css/example.css/123456/ -> /resources/css/example.css | |
RewriteRule ^(.+\.)(js|css)/\d+/?$ /$1$2 [NC,L] |
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> | |
<meta charset="UTF-8"> | |
<title>w3cschools</title> | |
<script type="text/javascript"> | |
(function() | |
{ | |
"use strict"; |
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
#include <SoftwareSerial.h> | |
#include <Regexp.h> | |
SoftwareSerial BT(7, 8); | |
void setup() | |
{ | |
BT.begin(9600); | |
Serial.begin(9600); | |
} |