Skip to content

Instantly share code, notes, and snippets.

View zaknafeyn's full-sized avatar
🇺🇦
Support Ukraine

Valentyn Radchuk zaknafeyn

🇺🇦
Support Ukraine
View GitHub Profile
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active July 3, 2024 20:33
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active June 19, 2024 14:10
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@jgrodziski
jgrodziski / docker-aliases.sh
Last active June 23, 2024 03:01
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@nicohq
nicohq / Kottans.md
Last active August 29, 2015 14:18
Kottans.Fin
@Aracem
Aracem / styles.xml
Last active July 11, 2017 15:48
Material Text Styles supported for all version with Appcompat + Calligraphy Library ( https://github.com/chrisjenx/Calligraphy ) Material Design recomendations http://www.google.com/design/spec/style/typography.html#typography-roboto-noto Remember to add the fonts to your source/fonts folder
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- TextView Empty Base-->
<style name="TextViewBase" parent="android:TextAppearance.Holo.Widget.TextView"/>
<!-- ActionBar Title -->
<style name="CustomActionBarTitleBase" parent="TextAppearance.AppCompat.Widget.ActionBar.Title"/>
<!-- Text Views Default Base -->
@listochkin
listochkin / gitter-dev-ua-faq.md
Last active April 27, 2021 15:59
Gitter Dev-UA FAQ

FAQ по Gitter-чатам группы Dev-UA

Так получилось, что мы открываем сейчас достаточно много чатов в [Gitter.im][1]: часто это совсем новые для нас сообщества (как [PHP-чат][2], например), а часто - это уже существующие чаты, которые мы создали и администрировали в Skype (например, [Frontend-UA][3]). Не зависимо от того, новый ли это чат или "переезжающий", нам раз за разом задают одни и те же вопросы. Здесь мы собрали их и подготовили несколько ответов.

Почему Gitter?

  1. Больше 300 человек в чате (это лимит в Skype)
@programulya
programulya / js-course mail
Created September 4, 2014 21:18
New edition
/**
* Created by Programulya on 9/4/2014.
*/
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 25; // First row of data to process
var numRows = 35; // Number of rows to process
var dataRange = sheet.getRange(startRow, 1, numRows);
// Fetch values for each row in the Range.
@wikimatze
wikimatze / gist:9790374
Created March 26, 2014 18:43
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

@willurd
willurd / web-servers.md
Last active July 19, 2024 02:15
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ruiwen
ruiwen / fb-angular.js
Last active July 5, 2017 10:40
Wrapping and initialising the Facebook SDK with Angular JS
// Facebook SDK
angular.module('facebook', [])
.directive('fb', ['$FB', function($FB) {
return {
restrict: "E",
replace: true,
template: "<div id='fb-root'></div>",
compile: function(tElem, tAttrs) {
return {
post: function(scope, iElem, iAttrs, controller) {