Skip to content

Instantly share code, notes, and snippets.

@thomaswitt
thomaswitt / VPNConfigurationProfiles.mobileconfig
Last active May 1, 2024 18:03
An OnDemand VPN iOS profile for iPad and iPhone that automatically connects you to different VPNs (e.g. Meraki, FRITZ!Box and Streisand) | Blog-Entry: https://thomas-witt.com/auto-connect-your-ios-device-to-a-vpn-when-joining-an-unknown-wifi-d1df8100c4ba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<!-- Home: Manual -->
<dict>
<key>UserDefinedName</key>
@andriyudatama
andriyudatama / VS Code Disable GPU Acceleration
Last active May 1, 2024 18:01
Disable Hardware Acceleration (GPU) on Visual Studio Code
Visual Studio Code frequently crashes linux. Using NVIDIA GPU
1. Open command pallete (Ctrl + Shift + P)
2. Enter "Preferences: Configure Runtime Arguments"
3. Add config: "disable-hardware-acceleration": true
4. Restart VS Code
@amaxwell01
amaxwell01 / interviewitems.MD
Created September 15, 2012 14:17
My answers to over 100 Google interview questions

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@abhishekkrthakur
abhishekkrthakur / falcon_pdf_bot.py
Created July 16, 2023 09:03
This is a reference to the YouTube tutorial here: https://youtu.be/hSQY4N1u3v0
import argparse
from pdfminer.high_level import extract_text
from sentence_transformers import SentenceTransformer, CrossEncoder, util
from text_generation import Client
PREPROMPT = "Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\n"
PROMPT = """"Use the following pieces of context to answer the question at the end.
If you don't know the answer, just say that you don't know, don't try to

Hi 👋, my name is Ori and I'll help you setup password-protected notes on Quartz!

To do so, you will need to modify a few files.

Firstly, install @expo/spawn-async and Staticrypt with $ npm install @expo/spawn-async staticrypt

After that, paste this code into quartz/password.ts

import spawn from "@expo/spawn-async"
@avidale
avidale / t5_extra_models.py
Created August 29, 2021 07:59
T5ForSequenceClassification
import torch
import copy
from torch import nn
from transformers import T5PreTrainedModel
from transformers.models.t5.modeling_t5 import T5Stack
from transformers.modeling_outputs import SequenceClassifierOutput
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
def mean_pooling(inputs, mask):
@volks73
volks73 / AutoHotkey.ahk
Created September 26, 2017 14:47
AutoHotkey script to change Caps Lock to Control on hold and Escape on press and release
; Change Caps Lock to Control when held down; otherwise, Escape
;
; Originally based on the answer provided in
; [this](https://superuser.com/questions/581692/remap-caps-lock-in-windows-escape-and-control)
; StackExchange SuperUser question.
;
; A shortcut should be created for this script and placed in the Windows 10
; user's startup folder to automatically enable the feature on boot/startup.
; The user's startup folder can be found using the following steps:
;
@rene-d
rene-d / colors.py
Last active May 1, 2024 17:50
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@luizomf
luizomf / settings.json
Last active May 1, 2024 17:46
VS Code Python and Code Runner Settings for Windows
{
"window.zoomLevel": 5,
"editor.formatOnSave": true,
"code-runner.executorMap": {
"python": "clear ; .\\venv\\Scripts\\python.exe"
},
"code-runner.runInTerminal": true,
"code-runner.clearPreviousOutput": true,
// Python
"[python]": {