Skip to content

Instantly share code, notes, and snippets.

PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH
JAVA_HOME='/usr/libexec/java_home -v 11'
alias pddl="docker run -it --rm -v $PWD:/workspace cs4246/base python"
alias recordscr='/Users/leslieharland/ffmpeg/bin/ffmpeg -f avfoundation -r 1 -probesize 20M -threads 1 -i "1:" -vcodec libx264 -b:v 128k -s hd720 /Users/leslieharland/A0183975L.mp4'
alias tag='python buildtagger.py sents.train model-file'
alias view='python runtagger.py sents.test model-file sents.out; python eval.py sents.out sents.answer'
@zhabinskiy
zhabinskiy / laravel-livewire-test.php
Last active July 14, 2021 21:41
Laravel Livewire test example
<?php
namespace Tests\Feature;
use App\User;
use Tests\TestCase;
use Livewire\Livewire;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Testing\RefreshDatabase;
@sgyyz
sgyyz / uao.md
Last active May 3, 2024 14:15
uao command - unzip your project and import to intellij automatically
  1. import project into idea command
$ curl -L "https://gist.githubusercontent.com/chrisdarroch/7018927/raw/9a6d663fd7a52aa76a943fe8a9bc6091ad06b18d/idea" -o /usr/local/bin/idea
$ chmod +x /usr/local/bin/idea
  1. unzip and open project command
$ curl -L "https://gist.githubusercontent.com/sgyyz/adfa4f05af3d81cf0e17e19cf7044c85/raw/b6b9e871d5a4f5435a09d00b0a52e3db0b90699a/uao.sh" -o /usr/local/bin/uao.sh
$ chmod +x /usr/local/bin/uao.sh
$ ln -sf /usr/local/bin/uao.sh /usr/local/bin/uao
@booleangate
booleangate / a-salesforce-oauth-2.0-jwt-bearer-token-flow-walk-through.md
Last active August 14, 2024 00:47
Salesforce OAuth 2.0 JWT Bearer Token Flow walk-through

Salesforce OAuth 2.0 JWT Bearer Token Flow Walk-Through

This document will walk you through how to create or configure a Salesforce application for use with JWT authentication. These configuration steps and the example code works as of Salesforce API version 42.0.

Prerequisites

Create an RSA x509 private key/certification pair

@andreibosco
andreibosco / creative-cloud-disable.md
Last active August 29, 2024 03:27
disable creative cloud startup on mac
@karlhorky
karlhorky / pr.md
Last active November 2, 2023 13:44 — forked from piscisaureus/pr.md
Fetch all GitHub pull requests to local tracking branches

NOTE

You may not need local branches for all pull requests in a repo.

To fetch only the ref of a single pull request that you need, use this:

git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
@pebriana
pebriana / Yii Examples of Using CDbCriteria
Last active April 28, 2022 12:34
Yii Examples of Using CDbCriteria
<?php
//Examples of Using CDbCriteria
//Basic Usage
$Criteria = new CDbCriteria();
$Criteria->condition = "price > 30";
$Products = Product::model()->findAll($Criteria);
//OR
@natelandau
natelandau / .bash_profile
Last active September 24, 2024 06:19
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@junfenglx
junfenglx / semaphores.c
Created November 11, 2013 13:12
named semaphores use example.
#include <stdio.h> /* printf() */
#include <stdlib.h> /* exit(), malloc(), free() */
#include <unistd.h>
#include <sys/types.h> /* key_t, sem_t, pid_t */
#include <sys/wait.h>
#include <sys/shm.h> /* shmat(), IPC_RMID */
#include <errno.h> /* errno, ECHILD */
#include <semaphore.h> /* sem_open(), sem_destroy(), sem_wait().. */
#include <fcntl.h> /* O_CREAT, O_EXEC */