Skip to content

Instantly share code, notes, and snippets.

fenrir fenrir-naru

Block or report user

Report or block fenrir-naru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@1d10t
1d10t / contacts2.db-to-vcf.php
Created May 27, 2017
android contacts2.db to vcard file (vcf) converter
View contacts2.db-to-vcf.php
<?php
ini_set('mbstring.language', 'Russian');
function db(){
static $db = null;
if(!$db){
$db = new SQLite3(__DIR__.'/contacts2.db');
$db->busyTimeout(60*60*1000);
@hana-mignon
hana-mignon / Upload an image to Gist.md
Last active Jul 24, 2019
Gistにウエブで画像をアップロードする方法
View Upload an image to Gist.md

Gistにウエブで画像をアップロードする方法

  1. Gistにファイルを作る
  2. コメント欄が出来るので、コメント欄にPCから画像をドラッグする。
  3. コードがコメント欄に出るので、それをコピーする。
  4. ファイルにコードを貼り付ける。
  5. 右下のアップデートボタンを押す

@Furao
Furao / gitlab_process.md
Created Jun 4, 2014
DO-178C gitlab process
View gitlab_process.md

Use Case: I need to add some new requirements.

  • Create a new branch and add all of my requirements
  • Make a pull request to master
  • All of the new requirements are easily shown in the gitlab pull request
  • Reviewers would add their comments in gitlab to specific lines.
  • Developers would be able to comment back and forth in the comment section of the pull request and then make fixes
  • Reviewers can then verify once a fix has been made (Add a new comment to the line saying it is fixed?)
  • All changes have been accepted so the branch is merged into master
@ujifgc
ujifgc / vmg2xml.rb
Last active Jan 4, 2017
This tiny script converts SMS text message backup from VMG to XML. Formats are tested on transferring Kies bada backup to Android SMS Backup & Restore.
View vmg2xml.rb
require 'cgi'
class String
def extract( token )
self.scan( /#{token}:(.*)/ ).flatten.first
end
end
puts "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n<smses>\n"
@phillipadsmith
phillipadsmith / mod_rewrite_rules
Created Nov 22, 2011
Mobile site redirection using mod_rewrite
View mod_rewrite_rules
RewriteEngine On
# If the user is asking for the fullsite, set a cookie, remove the query, and stop.
RewriteCond %{QUERY_STRING} ^fullsite$
RewriteRule ^/?(.*)$ http://domain.com/$1? [L,CO=fullsite:yes:.domain.com]
# If the user is asking for the mobilesite, set a cookie, remove the query, redirect and stop.
RewriteCond %{QUERY_STRING} ^mobilesite$
RewriteRule ^/?(.*)$ http://m.domain.com/$1? [L,CO=fullsite:no:.domain.com]
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created Nov 5, 2010
RSpec 2 syntax cheat sheet by example
View rspec-syntax-cheat-sheet.rb
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@bfoz
bfoz / Makefile
Created Feb 15, 2010
Compile and link a bootloader using SDCC
View Makefile
ASM= asx8051
CC= sdcc
BOOTLOADER_ADDRESS=0x3000
OUTPUT_DIR= build
.PHONY: $(OUTPUT_DIR)
.SUFFIXES:
.SUFFIXES: .asm .c .ihx .hex .rel
You can’t perform that action at this time.