Skip to content

Instantly share code, notes, and snippets.

View madmax's full-sized avatar

Grzegorz Derebecki madmax

View GitHub Profile
diff --git a/Python/random.c b/Python/random.c
index 93d300d..396041d 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -3,6 +3,9 @@
#include <windows.h>
#else
#include <fcntl.h>
+#if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)
+#include <sys/random.h>
@madmax
madmax / scoping.rb
Last active January 30, 2020 08:08
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails"
/* responsive version for sizes, we don't generate xs because it is arleady generated by bootstrap */
@each $breakpoint in map-keys($grid-breakpoints) {
@if $breakpoint != "xs" {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@each $prop, $abbrev in (width: w, height: h) {
@each $size, $length in $sizes {
.#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
}
}
Process: Lightworks [905]
Path: /Applications/Lightworks.app/Contents/MacOS/Lightworks
Identifier: com.editshare.lightworks
Version: 1.0 (1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Lightworks [905]
User ID: 501
Date/Time: 2016-08-04 13:34:02.955 +0200
@madmax
madmax / cache_key_test.rb
Created June 21, 2016 08:00
cache_key timestamp not calculated when using offset
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
#!/bin/bash
GITHUB_USER="madmax"
if [ "$1" != "" ]; then
echo "Merging pull request $1"
OUT=`basename $1`
curl --user $GITHUB_USER $1.patch > $OUT.patch
git am -s --3way --ignore-space-change $OUT.patch
rm $OUT.patch
else
""" Code folding options
nmap <leader>0 :set foldlevel=0<CR>
nmap <leader>1 :set foldlevel=1<CR>
nmap <leader>2 :set foldlevel=2<CR>
nmap <leader>3 :set foldlevel=3<CR>
nmap <leader>4 :set foldlevel=4<CR>
nmap <leader>5 :set foldlevel=5<CR>
nmap <leader>6 :set foldlevel=6<CR>
nmap <leader>7 :set foldlevel=7<CR>
nmap <leader>8 :set foldlevel=8<CR>
set nocompatible
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" swp to one directory outside project
" set backupdir=~/.vim/tmp,.
set nocompatible
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" swp to one directory outside project
" set backupdir=~/.vim/tmp,.