Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Owiesniak JanOwiesniak

View GitHub Profile
@gilcierweb
gilcierweb / _form.html.erb
Last active Jan 17, 2019
Upload image crop with Ruby and Rails, CarrierWave and Cropper.js
View _form.html.erb
#app/views/businesses/_form.html.erb
<%= form_with(model: business, scope: :business, local: true, :html => {multipart: true}) do |form| %>
<div class="row">
<div class="col-md-12">
<%= form.file_field :logo_image, id: :business_logo_image %>
<%= form.label :logo_image, class: 'upload' do %>
<i class="material-icons">file_upload</i>
<span>Choose image</span>
@dvdbng
dvdbng / vim-heroku.sh
Last active Oct 29, 2020
Run vim in heroku updated 2017
View vim-heroku.sh
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@LoranKloeze
LoranKloeze / whatsapp_phone_enumerator_floated_div.js
Last active Oct 15, 2020
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
View whatsapp_phone_enumerator_floated_div.js
/****** I've created a Chrome extension from this script, take a look at https://github.com/LoranKloeze/WhatsAllApp ********/
/******************** Keep in mind: this script is frozen. Check the url mentioned above. **********************************/
/******************** Keep in mind: this script is frozen. Check the url mentioned above. **********************************/
/******************** Keep in mind: this script is frozen. Check the url mentioned above. **********************************/
/******************** Keep in mind: this script is frozen. Check the url mentioned above. **********************************/
/******************** Keep in mind: this script is frozen. Check the url mentioned above. **********************************/
/******************** Keep in mind: this script is frozen. Check the url mentioned above. **********************************/
// Was this script of any use for you? Please consider a donation. It has taken me a lot of time to figure this
@tduarte
tduarte / publish-ghpages.md
Last active Oct 26, 2020
If you need to force push an subtree
View publish-ghpages.md
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@Chaser324
Chaser324 / ThreadedJob.cs
Created Apr 8, 2016
Unity ThreadedJob class for doing work on a separate thread and checking status or waiting on the main Unity thread.
View ThreadedJob.cs
// Source: http://answers.unity3d.com/questions/357033/unity3d-and-c-coroutines-vs-threading.html
//
// *****************************************************************************
// Example Job - Inheret from this class and override ThreadFunction:
// *****************************************************************************
// public class Job : ThreadedJob
// {
// public Vector3[] InData; // arbitary job data
// public Vector3[] OutData; // arbitary job data
//
You can’t perform that action at this time.