Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile
@topheman
topheman / git-notes.md
Created June 29, 2015 17:39
Git notes cheat sheet
@bitc
bitc / gist:14087883c926ec97011f
Last active December 22, 2020 07:02
vagga build snippets
# All build snippets are based on Ubuntu trusty:
containers:
build:
setup:
- !Ubuntu trusty
- !UbuntuUniverse
# ------------------------------------------------------------------------
@A-gambit
A-gambit / task.md
Last active November 14, 2016 22:16

#Задание 1 - Верстка

Сверстать старницу для всех размеров экрана указаных в макабах на React.js (JSX): Cтраница

Требования:

  • Сделать как минимум хедер + одина из секций
  • Можно использывать препроцесор (SASS/Less/Stylus)
  • Задание отправить линком на JSFiddle/JSBin/СodePen/GithubPages
@cefn
cefn / gist:7bb3dc5fbc61e03c9457
Created May 18, 2015 16:29
Example of trying to use Twisted's trial as an asynchronous unit test framework with paho-mqtt in python
#!/usr/bin/python
from __future__ import print_function
from threading import Thread
from twisted.internet.defer import Deferred
from twisted.trial.unittest import TestCase
from paho.mqtt.client import Client
@glen-cheney
glen-cheney / encoding-video.md
Last active November 24, 2024 10:09
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@rochacbruno
rochacbruno / mainpython.md
Last active July 22, 2024 19:03
Use of __main__.py

The use of __main__.py to create executables

myprojectfolder/
    |_ __main__.py
    |_ __init__.py

Being __main__.py:

print("Hello")

archim@monitoring:/etc/smokeping$ cat watch.sh
#!/bin/bash
cd /etc/smokeping/config.d
while :; do
inotifywait -e CLOSE_WRITE /etc/smokeping/config.d/*
for f in *config.txt; do
python /etc/smokeping/convert.py $f > `basename $f .txt`_converted.txt
done
invoke-rc.d smokeping restart
done
@unbracketed
unbracketed / branch-fu.md
Created April 7, 2015 17:49
Moving commits between branches

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y
@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 15, 2025 16:19
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@miraculixx
miraculixx / gmail.py
Created March 2, 2015 15:31
Scrapy spider for Gmail API, using Django AllAuth as the token source
# -*- coding: utf-8 -*-
import base64
from items import EmailItem, EmailLabelItem
from loader import JSONItemLoader
from oauth2spider import OAuth2Spider
class GmailSpider(OAuth2Spider):
name = "gmail"