Skip to content

Instantly share code, notes, and snippets.

@pjehan
pjehan / xrandr-two-mirroring.sh
Created September 4, 2024 06:52
Xrandr config to setup 2 extra monitors with mirroring
xrandr --output eDP-1 --pos 0x0 --output DP-1 --mode 1280x720 --right-of eDP-1 --output HDMI-1 --mode 1280x720 --same-as DP-1
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@pjehan
pjehan / js_array_from_db_query.php
Last active August 29, 2015 14:01
Create a javascript array from an SQL query using PHP
<?php
// Search for the latitude and longitude in the database
$query = mysqli_query($con,"SELECT lat, `long` FROM shop");
// String used to store the javascript array
$locations = '';
$i = 0;
while ($row = mysqli_fetch_array($query)) {