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 | |
# Author: Anatooly <anatooly.com> | |
# Based on code by Nikolaos Dimopoulos | |
# Based on code by Remigijus Jarmalavicius | |
# Checks the files to be committed for the presence of print_r(), var_dump(), die() | |
# The array below can be extended for further checks | |
php_checks[1]="var_dump(" | |
php_checks[2]="print_r(" |
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
sudo nano /etc/rc.local | |
sleep 15 | |
chown anatooly /sys/kernel/debug/ | |
chown anatooly /sys/kernel/debug/vgaswitcheroo/switch | |
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch | |
exit 0 | |
sudo nano /etc/fstab |
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
sudo nano /etc/modprobe.d/rt2800pci.conf | |
options rt200pci nohwcrypt=1 | |
sudo iwconfig wlan0 rate 54M | |
sudo apt-get install iftop | |
sudo iftop -i wlan0 # See Wi-Fi speed |
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
/* | |
BUILD: | |
gcc -shared -fPIC `pkg-config gtk+-x11-2.0 --cflags --libs` -o libwinmenu.so main.c | |
gcc -shared -fPIC `pkg-config gtk+-x11-3.0 --cflags --libs` -o libwinmenu3.so main.c | |
INSTALLATION: | |
cp libwinmenu.so /usr/lib/gtk-2.0/modules/libwinmenu.so | |
cp libwinmenu3.so /usr/lib/gtk-3.0/modules/libwinmenu.so | |
echo 'export GTK_MODULES=winmenu' >> ~/.profile or similar | |
*/ |
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 | |
// php json.php | |
$json = array( | |
"key1" => "value1", | |
"key2" => "value2", | |
"key3" => array( | |
"key4" => array( | |
"param1", "param2", "param3", | |
"param4", "param5", "param6" | |
) |
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
// valac --thread --pkg json-glib-1.0 json.vala | |
using Json; | |
int main(string[] args) { | |
size_t length; | |
string json; | |
string[] std_fields = { | |
"param1", "param2", "param3", | |
"param4", "param5", "param6" |
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
diff --git a/vapi/mysql.vapi b/vapi/mysql.vapi | |
index b0a0acb..fe217af 100644 | |
--- a/vapi/mysql.vapi | |
+++ b/vapi/mysql.vapi | |
@@ -257,6 +257,35 @@ namespace Mysql { | |
public bool data_seek (ulong offset); | |
} | |
+ | |
+ [CCode (cname = "MYSQL_BIND")] |
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
// alac mysql.vala --pkg mysql --Xcc=-lmysqlclient | |
using Mysql; | |
int main (string[] args) | |
{ | |
int rc = 0; | |
string host = "127.0.0.1"; |
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 | |
$rc = 0; | |
$host = '127.0.0.1'; | |
$user = 'root'; | |
$password = ''; | |
$database = 'test'; | |
$port = 3306; | |
$socket = null; |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+a"], "command": "show_overlay", "args": {"overlay": "command_palette"} }, | |
{ "keys": ["ctrl+shift+n"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, | |
{ "keys": ["ctrl+shift+alt+n"], "command": "goto_symbol_in_project" }, | |
{ "keys": ["ctrl+b"], "command": "goto_definition" }, | |
{ "keys": ["ctrl+alt+left"], "command": "jump_back" }, | |
{ "keys": ["ctrl+alt+right"], "command": "jump_forward" }, | |
{ "keys": ["ctrl+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }, |
OlderNewer