This file contains hidden or 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
import subprocess | |
from subprocess import call | |
call(['google-chrome', 'https://cdn.materialdesignicons.com/4.7.95/']) |
This file contains hidden or 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
# Example using google chrome | |
import subprocess | |
from subprocess import call | |
def winexists(target): | |
for line in subprocess.check_output(['wmctrl', '-l', '-x']).splitlines(): | |
window_name = line.split(None, 3)[2].decode() | |
if window_name == target: | |
return True | |
return False |
This file contains hidden or 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 result = ''; var elements = document.getElementsByClassName('_2pio'); for(var i = 0; i < elements.length; i++) { result += (elements[i].innerHTML + '\n') } console.log(result) |
This file contains hidden or 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
import { Model } from '@vuex-orm/core' | |
import User from './User' | |
export default class Comment extends Model { | |
static entity = 'comments' | |
static fields() { | |
return { | |
id: this.increment(), | |
body: this.attr(null), |
This file contains hidden or 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 | |
namespace App\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class ProjectBillRequest extends FormRequest | |
{ | |
/** | |
* Determine if the user is authorized to make this request. |
This file contains hidden or 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 | |
namespace App\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class ProjectBillRequest extends FormRequest | |
{ | |
/** | |
* Determine if the user is authorized to make this request. |
This file contains hidden or 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
// query | |
{ | |
hero { | |
name | |
} | |
} | |
// result | |
{ | |
"data": { |
This file contains hidden or 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
{ | |
"heading": "example heading", | |
"questions": [ | |
{ | |
"question": "what is 1 + 2?", | |
"choices": [ | |
{ | |
"text": "1", | |
"type": "text", | |
"media": { |
This file contains hidden or 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 | |
if (App::environment('local')) { | |
// The environment is local | |
} | |
if (App::environment(['local', 'staging'])) { | |
// The environment is either local OR staging... | |
} |
This file contains hidden or 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
^+!c:: | |
if WinExist("ahk_exe chrome.exe") | |
WinActivate, ahk_exe chrome.exe | |
else | |
Run, chrome.exe | |
return |
NewerOlder