Skip to content

Instantly share code, notes, and snippets.

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 7, 2024 17:37
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@mortenson
mortenson / sams_portland_stuff.md
Last active May 7, 2024 17:34
Sam's fun things to do in Portland

Portland recommendations by Sam

Sorted by location-ish. I tried to reduce the list to places I think are good for visitors vs. my absolute favorites, but I put a section at the bottom for places that may not be for everyone.

Breakfast / Brunch

Toki Restaurant (Downtown)

580 SW 12th Ave

My order: Grilled mackerel breakfast with a bloody mary. Their Dalgona coffee is quite good too.

@flatlinebb
flatlinebb / mpv keyboard shortcuts
Last active May 7, 2024 17:34
mpv keyboard shortcuts
Keyboard Control
LEFT and RIGHT
Seek backward/forward 5 seconds. Shift+arrow does a 1 second exact seek (see --hr-seek).
UP and DOWN
Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see --hr-seek).
Ctrl+LEFT and Ctrl+RIGHT
Seek to the previous/next subtitle. Subject to some restrictions and might not always work; see sub-seek command.
Ctrl+Shift+Left and Ctrl+Shift+Right
Adjust subtitle delay so that the next or previous subtitle is displayed now. This is especially useful to sync subtitles to audio.
[ and ]
@m-jovanovic
m-jovanovic / .editorconfig
Created June 7, 2023 12:17
Sample editor config with a bunch of rules turned off 😅
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
indent_style = space
@kepano
kepano / obsidian-web-clipper.js
Last active May 7, 2024 17:33
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@mrjurin
mrjurin / laravel_post_receive hook
Created October 26, 2020 06:25 — forked from vool/laravel_post_receive hook
Post receive hook for Laravel website deploy
#!/bin/bash
echo "********************"
echo "Post receive hook: Updating website"
echo "********************"
#set the git repo dir
GIT_REPO_DIR=~/git/<repo>.git
echo "The git repo dir is $GIT_REPO_DIR"
class Solution {
public:
vector<int> closestPrimes(int left, int right) {
//Apply sieve of eratosthenes
vector<bool> isPrime(right+1,true);
for(int i=2;i*i<=right;++i){
if(isPrime[i]==true){
for(int j=2;i*j<=right;++j)
isPrime[i*j]=false;
}
@immujahidkhan
immujahidkhan / tips_tricks-ar.json
Last active May 7, 2024 17:32
tips_tricks-ar
[
{
"icon": "",
"en-title": "Android Useful Tricks",
"type": "Tips",
"body": "<center> <h3> 34 نصائح وحيل android للحصول على أقصى استفادة من هاتفك ربما لم تكن تعرف عنها </h3> </center>\n<p>\n نظام تشغيل mobile android من google\n يبدو بسيطًا على السطح ، لكن حفر\n أعمق وتجد العديد من الطرق للاختراق\n انها للراحة والتخصيص.\n تعال معنا ونحن نغوص في android\n نظام التشغيل واستكشاف بعض الرائع\n ميزات خفية.\n <br>\n android هو نظام تشغيل صغير رائع.\n إنها مليئة تمامًا بميزات رائعة ،\n اختراقات رهيبة ، والحيل الموفرة للوقت.\n لكن كم تعرف حقًا\n هاتفك أو جهازك اللوحي؟ بالتأكيد ، يمكنك صنع\n المكالمات الهاتفية وإرسال النصوص ، لكننا نراهن\n هناك شيء ما في هذا المقال\n لم تكن على علم.\n <br>\n android قوي بشكل ملحوظ ،\n نظام تشغيل الهاتف المحمول المبتكر\n في كثير من الأحيان قفزة ios من apple في new\n دعم التكنولوجيا. 5g ، دفع nfc ،\n لوحات مفاتيح مخصصة ... تستمر القائمة. كل\n هذه الوظيفة الحديثة تجعلها\n لنظام التشغيل المعقد ، المت
@JoeCrescoll
JoeCrescoll / post_receive
Last active May 7, 2024 17:31
Post receive hook on a Git bare repo for a Laravel project deploy
#!/bin/bash
# Adapted from https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa
# Changes these variables values
TARGET="/home/poweruser/www/app"
GIT_DIR="/home/poweruser/menufinder.git"
BRANCH="master"
while read oldrev newrev ref
do
function my_custom_post_event () {
$labels = array(
'name' => _x('Event', 'post type general name'),
'singular_name' => _x('Event', 'post type singular name'),
'add_new' => _x('Add new event', 'event'),
'add_new_item' => __('Add new event'),
'edit_item' => __('Edit event'),
'new_item' => __('New event'),
'all_items' => __('All events'),
'view_item' => __('View event'),