Skip to content

Instantly share code, notes, and snippets.

View Areso's full-sized avatar
🎯
Writing a game for Steam Game Festival

Anton Gladyshev Areso

🎯
Writing a game for Steam Game Festival
View GitHub Profile
@Areso
Areso / raspberry.txt
Created November 9, 2016 14:05
raspberry
setup audio output on
hdmi: amixer cset numid=3 2
anal: amixer cset numid=3 1
auto: amixer cset numid=3 0
change resolution in
sudo nano /boot/config.txt
framebuffer
turn off border of dead pixels
@Areso
Areso / pythonsub
Created January 23, 2017 12:52
pythonsub
import subprocess
bashCommand = "uptime"
#output = subprocess.check_output(['bash','-c', bashCommand])
subprocess.Popen(bashCommand)
@Areso
Areso / export_csv.php
Created October 28, 2017 05:21 — forked from janschoepke/export_csv.php
MySQL CSV Export via PHP (PHP7 ready)
<?php
/* vars for export */
// database record to be exported
$db_record = 'XXX_TABLE_NAME_XXX';
// optional where query
$where = 'WHERE 1 ORDER BY 1';
// filename for export
$csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv';
// database variables
@Areso
Areso / export_csv.php
Created October 28, 2017 05:21 — forked from apocratus/export_csv.php
Export MySQL to CSV (php script)
<?php
/* vars for export */
// database record to be exported
$db_record = 'XXXXXXXXX';
// optional where query
$where = 'WHERE 1 ORDER BY 1';
// filename for export
$csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv';
// database variables
git clone https://github.com/sshuttle/sshuttle.git && python setup.py install
apt-get install sshuttle
sudo sshuttle -r username@sshserver 0.0.0.0/0
Invoke-Command -ComputerName Server01, Server02 -ScriptBlock {Get-UICulture}
Invoke-Command -ComputerName Server01, Server02 -FilePath c:\Scripts\DiskCollect.ps1
Enter-PSSession Server01
Exit-PSSession
@Areso
Areso / check_sql_server.py
Last active April 25, 2018 11:12
check_sql_server.py
import subprocess
##Import-Module FailoverClusters
##Get-ClusterResource
#r = subprocess.call(["C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe", "Get-ClusterResource", ""])
#print(r)
#print("hw");
args = ["C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe", "Get-ClusterResource"]
process = subprocess.Popen(args, stdout=subprocess.PIPE)
@Areso
Areso / pythonCallingFromPHP.txt
Created April 26, 2018 04:39
python calling (php)
exec("python mypythonscript.py someparams",$output);
var_dump($output);
shell_exec()
exec()
backticks
@Areso
Areso / ubuntuproblems.txt
Created April 29, 2018 19:46
ubuntuproblems.txt
/boot/grub
For configuration see
/etc/default/grub
sudo blkid
Create a new empty partition after /dev/sda8,
make it the size that you want your Arch partition to be.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.