Skip to content

Instantly share code, notes, and snippets.

View piedoom's full-sized avatar
🦀
rust rust rust rust rust rust rust rust

doomy piedoom

🦀
rust rust rust rust rust rust rust rust
View GitHub Profile
@pbzona
pbzona / host_modify.py
Last active March 20, 2019 20:36
self.discipline()
#!/usr/bin/env python3
import sys
number_of_args = len(sys.argv)
f = open("/etc/hosts", "a+")
for i in range(number_of_args - 1):
f.write("127.0.0.1 %s\n" % sys.argv[i + 1])
# To use:
anonymous
anonymous / dspG1.c
Created October 13, 2016 13:45
The dsp-G1 Analog Modeling Synthesizer Source Code
/*
Copyright 2016 DSP Synthesizers Sweden.
Author: Jan Ostman
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*/
 
#include "wiring.h"
#include "LPC8xx.h"
import bpy
from bpy.types import Panel, EnumProperty, WindowManager
import bpy.utils.previews
import os
# UI
class PreviewsExamplePanel(bpy.types.Panel):
bl_label = "Previews Example Panel"
bl_idname = "OBJECT_PT_previews"
@sameersbn
sameersbn / gitlab.conf
Created February 6, 2015 09:53
Nginx reverse proxy configuration for GitLab
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;
@jamesduncombe
jamesduncombe / jpeg_smash.rb
Created July 1, 2014 20:47
JPEG Smash but in Ruby...
#!/usr/bin/env ruby
require 'optparse'
options = {}
# Markers
JPEG_START = 'ffda'
JPEG_END = 'ffd9'
OptionParser.new do |opts|
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')