Skip to content

Instantly share code, notes, and snippets.

View Flower7C3's full-sized avatar
🪲
99 little bugs in the code, take one down, patch it around, 117 little bugs…

Bartłomiej Jakub Kwiatek Flower7C3

🪲
99 little bugs in the code, take one down, patch it around, 117 little bugs…
View GitHub Profile
@zachstronaut
zachstronaut / gist:1184900
Created August 31, 2011 22:22
Stretch HTML5 canvas to fill window, preserving aspect ratio
/**
* fullscreenify()
* Stretch canvas to size of window.
*
* Zachary Johnson
* http://www.zachstronaut.com/
*
* See also: https://gist.github.com/1178522
*/
@akwiatkowski
akwiatkowski / co_ja_kodze.rb
Created January 13, 2012 09:37
Co ja kodze
=begin
.',,,.
...,,,,,.
..'',;;;:;'.
.,,,;;,,,;:c,'
... .,;,;:;,,,,;:c;,.
;c:;,'.... ..,:lc:::::;,,,,,;c:'.
.;'.'''...','. ..;coddo:ccc:::;,,,,;:c:'.
.'',''...',,'''.. ..''... ...;coxxxxoc:llc:::;;;;;::cl;.
.';;,'....',,;,,,,,.... ....';;;:oxxxxddol:,,:::c::coxkOOdlclollc::;;;;;;;;::'.
@onyxraven
onyxraven / nvsprintf.php
Last active November 13, 2019 11:48
Named param vsprintf()
<?php
/**
* Named-Param vsprintf()
*
* positional-params based on key name, much the same as positional in sprintf()
*
* @link http://php.net/manual/en/function.sprintf.php
* @link http://www.php.net/manual/en/function.vsprintf.php
*
* @param string $str format string - replacements are in %KEY$x format
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@gmodarelli
gmodarelli / Multiple PHP under Ubuntu 13.04.md
Last active July 6, 2021 05:23
How to setup Ubuntu 13.04 to work with multiple PHP version at the same time

Multiple PHP version under Ubuntu 13.04

Update your machine

apt-get update
apt-get ugrade

Install some dependencies

apt-get install build-essential

@FlYos
FlYos / 1-Readme.md
Last active April 14, 2023 21:22
Redirection user by roles after login/logout in symfony2

Description of this Gist

This is the how to for redirection implementation by roles after login or logout in Symfony2

Step

  1. Copy AfterLoginRedirection.php and AfterLogoutRedirection.php to your bundle under the "Redirection" directory
  2. Edit your services.yml file in your bundle and copy/paste the content of services.yml
  3. Edit your security.yml file...
  4. ... add success_handler: redirect.after.login in form_login: section
  5. ... add success_handler: redirect.after.logout in logout: section
@stvhwrd
stvhwrd / website-dl.md
Last active March 13, 2024 17:05
Download an entire website for offline use with wget. Internal inks will be corrected so that the entire downloaded site will work as it did online.

The best way to download a website for offline use, using wget

There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.

First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/)


STEP 1:

@ControlledChaos
ControlledChaos / README.md
Last active June 22, 2023 07:47
Change the default WordPress post name to News and replace the Dashicon.

Change Default Posts to News

WordPress Snippet

@svolobuev
svolobuev / AppBundle\Resources\config\services.yml
Created February 26, 2016 06:58
JMS Serializer Subscriber example
services:
serializer.subscriber.news:
class: AppBundle\Serializer\Subscriber\NewsSubscriber
arguments: [@vich_uploader.storage, @liip_imagine.cache.manager, @request_stack]
tags:
- { name: jms_serializer.event_subscriber }
@nstarke
nstarke / release-android-debuggable.md
Last active May 22, 2024 21:16
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable